BlocosIA Wiki Editor

Operators

Reporter

( ) + ( )

Adds two numbers.

Reporter

( ) - ( )

Subtracts the second number from the first.

Reporter

( ) * ( )

Multiplies two numbers.

Reporter

( ) / ( )

Divides the first number by the second.

Reporter

pick random ( ) to ( )

Picks a random number between the two values (decimal if one of them is).

Boolean

( ) > ( )

True if the first value is greater.

Boolean

( ) < ( )

True if the first value is less.

Boolean

( ) = ( )

True if the values are equal (case doesn't matter).

Boolean

⟨ ⟩ and ⟨ ⟩

True only if both conditions are true.

Boolean

⟨ ⟩ or ⟨ ⟩

True if at least one condition is true.

Boolean

not ⟨ ⟩

Flips true and false.

Reporter

join ( ) ( )

Joins two texts into one.

Reporter

letter ( ) of ( )

Gets a letter by its position (1 = first).

Reporter

length of ( )

How many letters the text has.

Boolean

( ) contains ( ) ?

True if the text contains the other.

Reporter

( ) mod ( )

The remainder of a division. Great to check even numbers (mod 2 = 0).

Reporter

round ( )

Rounds to the nearest whole number.

Reporter

[abs] of ( )

Math functions: absolute value, square root, sine, cosine, logs…

Reporter

( ) to the power of ( )

Power: 2 to the 3rd = 8.

Reporter

[the smaller] of ( ) and ( )

The smaller or larger of two numbers.

Reporter

limit ( ) between ( ) and ( )

Keeps the number inside a range (great for health 0 to 100).

Reporter

map ( ) from range ( ) to ( ) into ( ) to ( )

Converts a value from one range to another (e.g. sensor 0–1023 to 0–100).

Reporter

round ( ) to ( ) decimal places

Rounds keeping some decimal places.

Reporter

[arcsine] of ( )

More functions: arcsin/cos/tan, sign, log 2, integer part, factorial…

Reporter

direction from x: ( ) y: ( ) to x: ( ) y: ( )

The direction (Scratch style) from one point to another.

Reporter

distance from x: ( ) y: ( ) to x: ( ) y: ( )

The distance between two points.

Reporter

convert ( ) from [decimal] to [binary]

Converts numbers between decimal, binary, hexadecimal and octal.

Boolean

( ) [≠] ( )

Compares with not equal (≠), greater or equal (≥) and less or equal (≤).

Boolean

( ) is between ( ) and ( ) ?

True if the number is between the two limits.

Boolean

⟨ ⟩ or ⟨ ⟩ but not both

True when only one of the conditions is true.

Boolean

( ) is [even] ?

Tests for even, odd, prime, integer, number or empty text.

Reporter

if ⟨ ⟩ then ( ) else ( )

Picks one of two values depending on the condition.

Reporter

random item of ( ) split by ( )

Picks a random item from a list written as text (e.g. rock,paper,scissors).

Reporter

letters ( ) to ( ) of ( )

Gets part of the text, from letter A to letter B.

Reporter

position of ( ) in ( )

Where a text appears inside another (0 = not found).

Reporter

replace ( ) with ( ) in ( )

Replaces every occurrence of a text with another.

Reporter

( ) in [UPPERCASE]

UPPERCASE, lowercase, Title Case, trimmed or reversed.

Reporter

repeat ( ) ( ) times

Repeats a text several times.

Reporter

item ( ) of ( ) split by ( )

Gets part N of a text split by comma (or another separator).

Reporter

number of items of ( ) split by ( )

How many parts the text has when split.

Boolean

( ) [starts with] ( ) ?

True if the text starts (or ends) with another.

Reporter

[code of letter] of ( )

Code of a letter (A = 65) or letter of a code.