See also
showGlobals(), property,
if
Usage
if logicalExpression then statement
if logicalExpression then statement
else statement
end if
if logicalExpression then
statement(s)
end if
if logicalExpression then
statement(s)
else
statement(s)
end if
if logicalExpression1 then
statement(s)
else if logicalExpression2 then
statement(s)
else if logicalExpression3 then
statement(s)
end if
if logicalExpression1 then
statement(s)
else logicalExpression2
end if
Description
Keyword;
if...then
logicalExpression
•
If the condition is
•
If the condition is
follow
, Lingo exits the
else
•
All parts of the condition must be evaluated; execution does not stop at the first condition that
is met or not met. Thus, faster code may be created by nesting
separate lines instead of placing them all on the first line to be evaluated.
When the condition is a property, Lingo automatically checks whether the property is
don't need to explicitly add the phrase
The
portion of the statement is optional. To use more than one
else
else-statement
The
portion always corresponds to the previous
else
include an
else nothing
Note: A quick way to determine in the script window if a script is paired properly is to press Tab. This
forces Director to check the open Script window and show the indentation for the contents. Any
mismatches will be immediately apparent.
gotoNetMovie
structure that evaluates the logical expression specified by
.
, Lingo executes the statement(s) that follow
TRUE
, Lingo executes the statement(s) following
FALSE
if...then
= TRUE
, you must end with the form
statement to associate an
structure.
after the property.
.
end if
statement; thus, sometimes you must
if
keyword with the proper
else
.
then
. If no statements
else
statements on
if...then
TRUE
then-statement
keyword.
if
. You
or
if
209
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