User Guide
field 207
Example
The first statement of this script checks whether the monitor is set to black and white and then
exits if it is:
on setColors
if _system.colorDepth = 1 then exit
sprite(1).foreColor = 35
end
See also
abort, halt(), quit(), pass, return (keyword)
exit repeat
Usage
-- Lingo syntax
exit repeat
Description
Keyword; instructs Lingo to leave a repeat loop and go to the statement following the end
repeat
statement but to remain within the current handler or method.
The
exit repeat keyword is useful for breaking out of a repeat loop when a specified
condition—such as two values being equal or a variable being a certain value—exists.
Example
The following handler searches for the position of the first vowel in a string represented by the
variable
testString. As soon as the first vowel is found, the exit repeat command instructs
Lingo to leave the repeat loop and go to the statement
return i:
on findVowel testString
repeat with i = 1 to testString.char[testString.char.count]
if "aeiou" contains testString.char[i] then exit repeat
end repeat
return i
end
See also
repeat while, repeat with
field
Usage
field(whichField)
Description
Keyword; refers to the field cast member specified by whichField.
• When whichField is a string, it is used as the cast member name.
• When whichField is an integer, it is used as the cast member number.
Character strings and chunk expressions can be read from or placed in the field.