Foreign Translations


The following translations from other languages may help you to get oriented in the land of SenseTalk.
%
The %
symbol is used in many languages as a 'modulo' operator, and is most commonly used to test whether a number is even or odd, or is evenly divisible by some number. SenseTalk has mod
and rem
operators for the general case. The more common divisibility tests are written like this:
if x is an even number then
…if x is divisible by 10 then
…if x is a multiple of 25 then
…
For more information, see Is a Multiple Of, Is Divisible By Operators.
=, ==, !=
Many languages use the =
symbol for assignment and ==
to test for equality. In SenseTalk =
(or the words is
, are
, equals
, is equal to
, etc.) means equals and the symbols ==
and !=
are not used. The put
and set
commands are used for assignment. For more information, see Comparison Operators and Storing into Containers.
++, --, +=, -=
These symbols are used in many languages for incrementing or decrementing a variable, or adding or subtracting an amount from a variable. In SenseTalk, the add
and subtract
commands are used:
add 1 to x -- increment
subtract 1 from x -- decrement
add foo to x -- add an amount
subtract foo from x -- subtract an amount
For more information, see Arithmetic Commands.