常见的lisp纬度和经度

时间:2015-06-27 17:18:59

标签: location common-lisp

我当前项目的基础是编写一些可以计算两点之间直接过程的代码。在网上找不到常见的口齿不清的代码,所以我不得不翻译我现有的代码。我认为我做得很好,但它仍然没有运行。任何帮助将不胜感激。

我遇到了障碍,有什么想法吗?发生以下错误:

printf("Enter two numbers:")
;scanf("&d &d", a, b)

我不明白的是编译器认为变量是函数的原因。

这是我到目前为止所做的:

;Compiler warnings for "nav.lisp" :
;   In COURSE-CALC: Undefined function LAT1
;   In COURSE-CALC: Undefined function LAT1
;   In COURSE-CALC: Undefined function LAT2

1 个答案:

答案 0 :(得分:6)

course-calc的定义中有太多括号。表达式

(sin(lat2))

调用函数lat2,然后在sin返回时调用lat2。你的lat2,howerver,不是一个函数,而是一个变量。你想说的是

(sin lat2)

行尾的(cos(lat1))同样如此。

相关问题