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

Help Please

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
aak194
376 Views, 2 Replies

Help Please

Hi

How can i extract 5th element of a list in autolisp.

For example i want to extract 5 from the list below.

(1 2 3 4 5 6)

AAK

2 REPLIES 2
Message 2 of 3
kdub_nz
in reply to: aak194

 

List indexing is zero based , so ;

(setq dataList '(1 2 3 4 5 6))

(setq fifth (nth 4 dataList)) ;=>> 5

 


// Called Kerry in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect.

class keyThumper<T> : Lazy<T>;      another  Swamper

Message 3 of 3
aak194
in reply to: kdub_nz

Thanks Kerry

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

Post to forums  

”Boost