Total Number of Cards

Ken Ray kray at
Fri Jan 27 01:54:18 EST 2006

On 1/26/06 11:35 PM, "Judy Perry" <jperryl at> wrote:

>>> This has go to be easy, but I can't find anything
>>> in the doc's or the mail archive.  How does one
>>> determine in code the total number of cards in a
>>> stack (apart from looping from the start to the
>>> last card)?

You got the right response from Phil and Judy, but I'd also like to make you
aware of "the cardnames of <stackDescriptor>", which will give you a
return-delimited list of the short names of each card, in order that they
appear in the stack. This can be really useful, and of course you can also
get "the number of lines" of the cardnames as an alternative to "the number
of cards" if you want.

  put the cardNames of this stack

  put the number of lines of (the cardNames of this stack)

(of course, I'd use "number of cards" or even "num of cds" because it's
shorter, but just giving you other options...)


Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the Use-livecode mailing list