Author Topic: Question about AutoLISP vs PHP Programming languages  (Read 3412 times)

0 Members and 1 Guest are viewing this topic.

StykFacE

  • Guest
Question about AutoLISP vs PHP Programming languages
« 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-)

Tuoni

  • Gator
  • Posts: 3032
  • I do stuff, and things!
Re: Question about AutoLISP vs PHP Programming languages
« Reply #1 on: May 21, 2009, 08:14:13 AM »
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

StykFacE

  • Guest
Re: Question about AutoLISP vs PHP Programming languages
« Reply #2 on: May 21, 2009, 08:15:29 AM »
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.  :-)

Tuoni

  • Gator
  • Posts: 3032
  • I do stuff, and things!
Re: Question about AutoLISP vs PHP Programming languages
« Reply #3 on: May 21, 2009, 08:16:15 AM »
Oh yeah, sorry - I misread the question :lol:

ziko30

  • Newt
  • Posts: 51
Re: Question about AutoLISP vs PHP Programming languages
« Reply #4 on: May 21, 2009, 09:41:48 AM »
I realize you specifically mentioned AutoLisp... But you could look at this.
http://www.afralisp.net/vl/array.htm
============== Acad Map 3D 2009================

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Question about AutoLISP vs PHP Programming languages
« Reply #5 on: May 21, 2009, 09:50:54 AM »
That should explain it, but from the LISP help:
Quote
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.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

StykFacE

  • Guest
Re: Question about AutoLISP vs PHP Programming languages
« Reply #6 on: May 21, 2009, 10:07:17 AM »
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