Carapace

Arithmetic Functions

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:

aInteger
bInteger

Return type: Integer


-

Subtract two integers.

Arguments:

aInteger
bInteger

Return type: Integer


%

Return the remainder when dividing the first integer by the second.

Arguments:

aInteger
bInteger

Return type: Integer


*

Multiply two integers.

Arguments:

aInteger
bInteger

Return type: Integer


/

Divide two integers.

Arguments:

aInteger
bInteger

Return type: Integer


random

Generate a random integer in the range 0 to one less than than the supplied maximum.

Arguments:

maxInteger

Return type: Integer


Contents Index Current topic: objects Related topics: functions