Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Current »

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.
If the value of "a" is equal to 1, the result will be "b".
If "a" is equal to 2, the result will be "c".
If "a" is equal to 3, the result will be "d".
And, if "a" is equal to 4, the result will be "e".

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:

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.