List of Logical Statements
The following are logical statements that can be used within the expressions of iif parameters:
.EQ. → Equal to (==)
.NE. → Not equal to (!=)
.LT. → Less than (<)
.LE. → Less than or equal to (<=)
.GT. → Greater than (>)
.GE. → Greater than or equal to (>=)
.AND. → AND (&&)
.OR. → OR (||)
.NOT. → NOT (!)
Example:
<O N="iifobject1" T="Project" Category="Logical Statement and Test" TransAlignRule="Right"> <!-- created by ParamML Examples on 09.02.2023 --> <P N="a" V="3" /> <P N="b" V="-40" /> <P N="c" V="-25" /> <P N="d" V="-30" /> <P N="e" V="80" /> <O N="iffexample" T="DesignCode"> <P N="Test1" V="iif(a .GE. b,c,d)" /> <P N="Test2" V="iif(a .EQ. 1,b, a .EQ. 2,c,a .EQ. 3,d,a .EQ. 4,e)" /> </O> </O> |
In the example provided, if the value of "a" is greater than "b", then the result of "Test1" will be "c". If not, the result will be "d". In "Test2", a nested "iif" function is utilized to handle more complex tests. |
To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=Logical+Statement+and+Test&obj=objidiks1ubk6utmhxl8k59dx4f) |
Example:
0 Comments