Page 134 - CodePilot V5.0 C5
P. 134
DIFFERENT BLOCKS OF BLOCKS EDITOR
Built-in blocks are always available and provide basic tools for logic, text, variables
and more in the Blocks Editor.
1. Control Blocks: These blocks manage the flow of the program using conditions,
loops and event triggers. They help you decide what happens and when. Example:
if Tests a given condition. If the condition is true, it runs the specified
then
blocks; if not, it skips them.
if
then Tests a given condition. If it is true, the blocks in the then part run;
else if it is false, the blocks in the else part run.
2. Logic Blocks: These blocks allow you to make decisions using true/false values. You
can compare values and use logical operations like AND, OR and NOT. Example:
Represents the constant value true. It is used to set the Boolean
true
properties of components or assign a condition value to a variable.
Represents the constant value false. It is used to set the Boolean
false
properties of components or assign a variable to represent a condition.
3. Math Blocks: These blocks perform basic and advanced mathematical calculations.
You can add, subtract, multiply, divide and more. Example:
This block lets you display numbers in decimal form and can also
decimal 0
show them in other formats, such as binary or hexadecimal.
This block compares two values to check if one is greater than,
=
less than or equal to the other.
4. Text Blocks: These blocks are used to work with words and characters. You can
join, split, change and compare text. Example:
This string can contain any characters (letters, numbers or other
special characters). On App Inventor it will be considered a Text object.
join Appends all of the inputs to make a single string. If there are no
inputs, it returns an empty string.
132 CodePilot (V5.0)-V

