A logical or of two expressions, A logical exclusive or of two expressions, The difference of two expressions – Boltek Lightning/2000 User Manual
Page 72: The multiplication of two expressions, The division of two expressions

L I G H T N I N G / 2 0 0 0
72
72
72
72
or
or
or
or
a logical or of two expressions
xor
xor
xor
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
div
div
div
the division of two expressions, truncated to a whole
number
Here are a few examples of valid if statements:
if
if
if
if @StrokeCount( 5 ) > 1000 then
then
then
then
#AlertStatusLineYellow
endif
endif
endif
endif
if
if
if
if ( @CGFlashCount > 50 ) and
and
and
and ( @StrokeCount > 1000 )
then
then
then
then
#AlertStatusLineYellow
if
if
if
if @CloseStormCount > 0 then
then
then
then
#Sound( ‘beep5’ )
#WriteLine( ‘A storm is nearby.’ )
endif
endif
endif
endif
endif
endif
endif
endif
if
if
if
if @HardwareType = 0 then
then
then
then
#WriteLine( ‘No lightning detector is installed.’ )
elseif
elseif
elseif
elseif @HardwareType = 1 then
then
then
then
#WriteLine( ‘LD-250 installed’ )
elseif @HardwareType = 4 then
#WriteLine( ‘LD-350 installed’ )
else
else
else
else
#WriteLine( ‘StormTracker installed’ )
endif
endif
endif
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.