Owner's manual

L I G H T N I N G / 2 0 0 0
72
7272
72
or
oror
or
a logical or of two expressions
xor
xorxor
xor
a logical exclusive or of two expressions
+
the sum of two expressions or the concatenation of
two quoted strings
-
the difference of two expressions
*
the multiplication of two expressions
/
the division of two expressions
div
divdiv
div
the division of two expressions, truncated to a whole
number
Here are a few examples of valid if statements:
if
ifif
if @StrokeCount( 5 ) > 1000 then
thenthen
then
#AlertStatusLineYellow
endif
endifendif
endif
if
ifif
if ( @CGFlashCount > 50 ) and
andand
and ( @StrokeCount > 1000 )
then
thenthen
then
#AlertStatusLineYellow
if
ifif
if @CloseStormCount > 0 then
thenthen
then
#Sound( ‘beep5’ )
#WriteLine( ‘A storm is nearby.’ )
endif
endifendif
endif
endif
endifendif
endif
if
ifif
if @HardwareType = 0 then
thenthen
then
#WriteLine( ‘No lightning detector is installed.’ )
elseif
elseifelseif
elseif @HardwareType = 1 then
thenthen
then
#WriteLine( ‘LD-250 installed’ )
elseif @HardwareType = 4 then
#WriteLine( ‘LD-350 installed’ )
else
elseelse
else
#WriteLine( ‘StormTracker installed’ )
endif
endifendif
endif
When using “and” in an expression, the part after the “and” is
evaluated only if the part before the “and” is true. This is
because the entire expression (before and after) can be true
only if the before part is true and the after part is true. If the
before part is false, then the entire expression is false whether
or not the after part is true. Since it does not matter in this
case if the after part is true or false, there is no sense in
wasting time evaluating the after part.