joelll 发表于 2022-7-5 18:52:17

I have got the error of "; err

I copied this lsp from a online tutorial, but it does work on my computer.
It keep showing the error:
"; error: no function definition"
--------------------------------------------------------------------------------------------
Here is my lsp:

(defun c:ift()(initget 1 "A B C")(setq grade (getkword "Please enter your grade (A/B/C):: "))(if (=grade "A")   (princ "You have receied marks greater than 75%."))(if (=grade "B")   (princ "You have receied marks greater than 65%."))(if (=grade "C")   (princ "You are failed.")))

rlx 发表于 2022-7-5 19:23:52

=grade "A" must be with a space between = and grade , so (if (= grade "A")... , same for B & C
 
 
Gr. Rlx

joelll 发表于 2022-7-5 19:33:37

Thanks very much, it solved the problem!!

SLW210 发表于 2022-7-5 20:00:43

Please read the Code Posting Guidelines and place your Code in Code Tags.
 

your code goes here
 

your code goes here
页: [1]
查看完整版本: I have got the error of "; err