Jump to content

Recommended Posts

Posted

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

Posted

Hey ajs,

 

You are actually very close. Just use the length function

 

(setq MyListLength (length MyList))

 

Regards

 

Jammie

Posted

Thanks for the tip. I don't know why I didn't think of trying 'length"

 

---AJS

Posted

Your welcome, glad I could be of some assistance

 

-Jammie

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...