The following functions are for integer arithmetic. They are equivalent to the methods on an Integer object.
| function name | description |
|---|---|
| + | add two integers |
| - | subtract two integers |
| % | return the remainder when dividing the first integer by the second |
| * | multiply two integers |
| / | divide two integers |
+Add two integers.
Arguments:
| a | Integer |
| b | Integer |
Return type: Integer
-Subtract two integers.
Arguments:
| a | Integer |
| b | Integer |
Return type: Integer
%Return the remainder when dividing the first integer by the second.
Arguments:
| a | Integer |
| b | Integer |
Return type: Integer
*Multiply two integers.
Arguments:
| a | Integer |
| b | Integer |
Return type: Integer
/Divide two integers.
Arguments:
| a | Integer |
| b | Integer |
Return type: Integer
randomGenerate a random integer in the range 0 to one less than than the supplied maximum.
Arguments:
| max | Integer |
Return type: Integer
| Contents | Index | Current topic: objects | Related topics: functions |