Lingo Dictionary > L-N > number (lines) |  |

number (lines)

Syntax

    the number of lines in chunkExpression

Description

Chunk expression; returns a count of the lines in a chunk expression. (Lines refers to lines delimited by carriage returns, not lines formed by line wrapping.)

Chunk expressions are any character, word, item, or line in any container of characters. Containers include 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 lines in a chunk expression.

Example

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

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

The result is 1.

Example

This statement sets the variable `lineCounter` to the number of lines in the field Names:

    lineCounter = the number of lines in member("Names").text

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

    lineCounter = member("Names").line.count

See also

`line...of`, `count()`, `number (characters)`, `number (items)`, `number (words)`