TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Mark on May 24, 2004, 07:55:12 AM
-
I used to think autolisp was this simple little language but after studying C++ I don't think that is the case anymore. Autolisp, or lisp in general is (in some ways) just as complex as C++. Also the similarities are are amazing, take for example the association list in autolisp and the structure in C++. They can both hold different types of variables and be easily accessed.
(setq offset
(list
(cons "name" "offset")
(cons "Length" 14.14)
(cons x 10.00)
(cons y 20.00)
)
)
(cdr (assoc "Length" offset))
14.14
struct line // structure template
{
char name[20];
float length;
double x;
double y;
};
line offset =
{
"offset",
14.14,
10.00,
20.00
};
cout << offset.length;
14.14
-
Well, I see you are beginning to understand C++ a little better....
Maybe we should start comparing ideas and tips on C++
-
>Maybe we should start comparing ideas and tips on C++
I don't think I'm at that stage yet, but i will keep it in mind. thanks.
-
Shoot ... maybe you could teach me something... I never RTFM ... I learned by going to HKU