This block allows you to create a condition: only if the statement (condition) next to if
is true, then the blocks next to then
will be executed.
You can customize this block and add multiple else if
or an else
by clicking on the +
sign. Use the available options and drag and drop them to the right.
With this block you can compare two numbers (to be added inside the holes). The result is either true or false.
Options:
=
: is equal to≠
: is not equal to<
: is smaller than ≤
: is smaller or equal than >
: is larger than≥
: is larger or equal than
This block allows you to make logical operations on two statements (conditions) (to be added inside the holes).
Options:
and
: is true of both statements are trueor
: is true if at least one of both statements is true
Returns the value null
. Can be used, for instance, to detect if a variable has already been initialised or not.
This block checks a statement (condition) added to test. If the statement is true, then the blocks next to if true then
are executed. If it is false, then the blocks next to if false then
are executed.
You can find a simple example for using the logic blocks in the sample project Rock-Paper-Scissors.