Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Beginner Lisp

2 REPLIES 2
Reply
Message 1 of 3
jimsmart
643 Views, 2 Replies

Beginner Lisp

I am doing an online lisp lesson from Autodesk, but am getting stuck with the code below

(defun C:PBOX) ()
(setq pt1 (getpoint "\nFirst corner: "))
(setq pt2 (getcorner pt1 "\nOther corner: "))

)

When I load this in the text editor in Vlisp I get back this message
bad DEFUN syntax: (C:PBOX)

This is exactly typed as per the lesson, I even copied the code from the lesson but am still getting this error message

Any help would be much appreciated
Thanks James
2 REPLIES 2
Message 2 of 3
stevor
in reply to: jimsmart

1. To get responsible responses, use the subject line;
like a line of:
'bad DEFUN syntax: (C:PBOX)'
or just
'bad DEFUN syntax'


2. Use a parens checker on any error that is ambiguous to you .

Since your
(defun C:PBOX) () ...

might work better as:
(defun C:PBOX () ....

'
S
Message 3 of 3
jimsmart
in reply to: jimsmart

Thanks Stevor
That works now

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost