Skip to main content
Skip table of contents

Booleans, Logical Operators, and Relational Operators

Logical Operators are used to connect two or more expressions into compound expressions yielding TRUE or FALSE Boolean values.

Thank you for your interest in LabMaestro! The page you are trying to access is under development. We are working on comprehensive documentation to help you make the most of our software. If you require any help, please feel free to contact us via email at support@vpixx.com.

Often used to create an expression that controls program flow or that modifies a calculation performed within an editable field.

Logical Operators

Logical operators supported by LabMaestro are:
NOT, denoted by !

EQUAL, denoted by ==

NOT EQUAL, denoted by !=

Truth Table

x

y

!x

x == y

x != y

FALSE

FALSE

TRUE

TRUE

FALSE

FALSE

TRUE

TRUE

FALSE

TRUE

TRUE

FALSE

FALSE

FALSE

TRUE

TRUE

TRUE

FALSE

TRUE

FALSE

Example 1

You can use a Boolean as part of an equation.

TRUE and expressions evaluated to TRUE will be interpreted as 1.

FALSE and expressions evaluated to FALSE will be interpreted as 0.

CODE
=*1+18/2*FALSE)*100

You can also combine combine Booleans with logical operators.

Try out the following expressions:

CODE
=(1+18/2*(FALSE==TRUE))*100
CODE
=(1+18/2*(TRUE==TRUE))*100
CODE
=(1+18/2*(FALSE==FALSE))*100
CODE
=(1+18/2*(FALSE!=TRUE))*100

Relational Operators

Relational operators supported by LabMaestro are:

OR, which checks if either of the value evaluates to true

BITWISEOR, which returns the value of the OR operation on each bits individually

AND, which checks if both values evaluate to true

BITWISEAND, which returns the value of the AND operation on each bits individually

>, which checks if the left operand is greater than the right one

>=, which checks if the left operand is greater or equal than the right one

<, which checks if the left operand is smaller than the right one

<=, which checks if the left operand is smaller or equal than the right one

Example 2

You can use a logical operator to control values of certain properties.

C
=(Var1 > Var2)*100 // Gives 100 when Var1 > Var2
CPP
=(Var1 OR Var2) // Gives 1 if Var1 or Var2 evaluates to TRUE

Example 3

You can combine logical operators:

CODE
=(Var1 OR Var2) AND (Var3 AND Var4)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.