ajs Posted February 9, 2009 Share Posted February 9, 2009 Can anyone tell me the syntax on how to obtain the amount of items that are in a particular list? Something to the effect of: (setq MyListLength (Quantity MyList)) wherein "Quantity" is the function that obtains the total amount of the components that make up MyList. I typically have a list that stores various coordinates and I need to know how many coordinates the list is holding at any given time. MyList: ((168.000 2.00000 0.000000) (68.0000 2.00000 0.000000) (68.0000 26.0000 0.000000) (69.0000 26.0000 0.000000)) So in this case, I'd be looking for the count to be 4. Any help would be appreciated. ---Thanks Quote Link to comment Share on other sites More sharing options...
jammie Posted February 9, 2009 Share Posted February 9, 2009 Hey ajs, You are actually very close. Just use the length function (setq MyListLength (length MyList)) Regards Jammie Quote Link to comment Share on other sites More sharing options...
ajs Posted February 9, 2009 Author Share Posted February 9, 2009 Thanks for the tip. I don't know why I didn't think of trying 'length" ---AJS Quote Link to comment Share on other sites More sharing options...
jammie Posted February 9, 2009 Share Posted February 9, 2009 Your welcome, glad I could be of some assistance -Jammie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.