SIMPOL Documentation

Arithmetic Operators

The usual set of arithmetic operators are also included in SIMPOL, such as: addition +, subtraction -, multiplication *, division /, modulus mod, and negation (unary minus) -. They are used in the usual way, but have a few interesting points when applied to the string data type. For details see the appendix. Just to provide a few examples, however, if a string is multiplied by an integer then the result is the integer's value copies of the string. Subtracting a string from another string results in a string that has had all of the substrings removed that match the argument that was being subtracted.