Lingo Dictionary > L-N > number (items)

 

number (items)

Syntax

the number of items in chunkExpression

Description

Chunk expression; returns a count of the items in a chunk expression. An item chunk is any sequence of characters delimited by commas.

Chunk expressions are any character, word, item, or line in any container of characters. Containers include fields (field cast members) and variables that hold strings, and specified characters, words, items, lines, and ranges in containers.

Note: The count() function provides a more efficient alternative for determining the number of items in a chunk expression.

Example

This statement displays the number of items in the string "Macromedia, the Multimedia Company" in the Message window:

put the number of items in "Macromedia, the Multimedia Company"

The result is 2.

Example

This statement sets the variable itemCounter to the number of items in the field Names:

itemCounter = the number of items in member("Names").text

You can accomplish the same thing with text cast members using the syntax:

itemCounter = member("Names").item.count

See also

item...of, count(), number (characters), number (lines), number (words)