Description
Keyword; specifies an item or range of items in a chunk expression. An item in this case is
any sequence of characters delimited by the current delimiter as determined by the
itemDelimiter
The terms
whichItem
refer to the position of items in the chunk.
Chunk expressions refer to any character, word, item, or line in any source of strings. Sources of
strings include field and text cast members and variables that hold strings.
When the number that specifies the last item is greater than the item's position in the chunk
expression, the actual last item is specified instead.
Example
This statement looks for the third item in the chunk expression that consists of names of colors
and then displays the result in the Message window:
put("red,yellow,blue green,orange".item[3])
-- "blue green"
The result is the entire chunk "blue green" because this is the entire chunk between the commas.
The following statement looks for the third through fifth items in the chunk expression. Because
there are only four items in the chunk expression, only the third item is used and fourth items are
returned. The result appears in the Message window.
put("red,yellow,blue green,orange".item[3..5])
-- "blue green, orange"
put item 5 of "red, yellow, blue green, orange"
-- ""
The following statement inserts the item Desk as the fourth item in the second line of the field
cast member All Bids:
member("All Bids").line[2].item[4] = "Desk"
See also
char...of, itemDelimiter,
line...of
Usage
-- Lingo syntax
textMemberExpression.line[whichLine]
line whichLine of fieldOrStringVariable
textMemberExpression.line[firstLine..lastLine]
line firstLine to lastLine of fieldOrStringVariable
Description
Keyword; specifies a line or a range of lines in a chunk expression. A line chunk is any sequence of
characters delimited by carriage returns, not by line breaks caused by text wrapping.
The expressions
in the chunk.
property.
,
, and
firstItem
number of
,
whichLine
firstLine
must be integers or integer expressions that
lastItem
members,
word...of
, and
must be integers that specify a line
lastLine
line...of
211
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers