
reference.language.logical.html Maven / Gradle / Ivy
Logical expressions
Logical expressions
Logical AND
Logical AND expressions are used to check both of 2 Boolean values.
A logical AND expression is a code fragment which produces a Boolean
value, which can then be used as an input for other operations: print, write, method call and so forth.
A logical AND expression has the form a op b
where a
and b
are Boolean values and op
is one the following comparison operators:
and
in the E and M dialects
&&
in the O dialect
Prompto is guaranteed to check a
first, and only check b
if a
is true.
Logical OR
Logical OR expressions are used to check either of 2 Boolean values.
A logical OR expression is a code fragment which produces a Boolean
value, which can then be used as an input for other operations: print, write, method call and so forth.
A logical OR expression has the form a op b
where a
and b
are Boolean values and op
is one the following comparison operators:
or
in the E and M dialects
||
in the O dialect
Prompto is guaranteed to check a
first, and only check b
if a
is false.
Logical NOT
Logical NOT expressions are used to reverse Boolean values.
A logical NOT expression is a code fragment which produces a Boolean
value, which can then be used as an input for other operations: print, write, method call and so forth.
A logical NOT expression has the form op a
where a
is a Boolean value and op
is one the following comparison operators:
not
in the E and M dialects
!
in the O dialect
© 2015 - 2025 Weber Informatics LLC | Privacy Policy