325
The terms
whichItem
,
firstItem
, and
lastItem
must be integers or integer expressions that
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.
Examples
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
,
number (items)
,
word...of
itemDelimiter
Syntax
the itemDelimiter
Description
System property; indicates the special character used to separate items.
You can use the
itemDelimiter
to parse filenames by setting
itemDelimiter
to a backslash (\)
in Windows or a colon (:) on the Macintosh. Restore the
itemDelimiter
character to a comma
(,) for normal operation.
This function can be tested and set.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...