TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: StykFacE on May 21, 2009, 08:06:49 AM
-
Okay, so one of my best friends whom also happens to be my gym partner is an extremely good web designer, which includes being a Photoshop guru and a very good PHP/MySQL Programmer. I know how to surf through PHP code and find and change Variables and Includes, etc... but I am far from calling myself any programmer. The best LISP routine I've done all by myself was about 15 lines of code.
Anyways I know that in PHP there is something called an Array, which associates values to keys in somewhat of a list form. I told Luke, my friend, that I know there's probably something like that in AutoLISP but its not called an array. He says most all programming languages have arrays. I was wondering if anyone here knew a bit of both to answer this question, since he's highly curious as to why I've never heard of an Array in AutoLISP.
I told him there's an actual command ARRAY and that could have been the possibility as to why there's not. Anyone have an idea? Just a curious question is all. Thanks
8-)
-
There are two (well, more...) types of array in PHP: Associative and 1/2/3/etc dimensional arrays.
You can find out more here: http://www.php.net/manual/en/language.types.array.php
-
There are two (well, more...) types of array in PHP: Associative and 1/2/3/etc dimensional arrays.
You can find out more here: http://www.php.net/manual/en/language.types.array.php
Thanks, but I was wondering what is the equivalent in AutoLISP. :-)
-
Oh yeah, sorry - I misread the question :lol:
-
I realize you specifically mentioned AutoLisp... But you could look at this.
http://www.afralisp.net/vl/array.htm
-
That should explain it, but from the LISP help:
vlax-make-safearray
Creates a safearray
(vlax-make-safearray type '(l-bound . u-bound)
[ '(l-bound . u-bound)...)]
A maximum of 16 dimensions can be defined for an array. The elements in the array are intialized as follows:
I find lists much more friendly that arrays & I think that is why very few use the array in LISP.
-
Awesome guys, thanks for the help. Next time we hit the gym I'll bring it up to him.
Funny, cuz we're the only guys who probably talk nerd gossip while "getting buff". lol