Not Function
Not
See Also: AND operator, OR operator, if command, if function
Purpose
To return the logical inverse of a value.
Return Type
Syntax
(not({variable}))
or
(not({expression}))
or
(not({value}))
What It Does
The Not function returns 0 if the variable is true or has a non-zero or non-blank value, and 1 if it is false or has a value of 0.
if ((not(mod(iYear, 4))) and (mod(iYear, 100)) ) begin
// code for leap year processing
end
In this example, the block of code inside begin and end is executed when the modulo 4 of variable iYear is zero (false) and the modulo 100 of iYear is not zero (true).
Example
Function IsSingle Returns Boolean
Boolean bIsMarried
Boolean bIsSingle
If (Not(bIsMarried)) ;
Move True to bIsSingle
Else ;
Move False to bIsSingle
Function_Return bIsSingle
End_Procedure
Notes
- If
{value}is other than a logical expression or of type integer, this function converts its value to integer first.