up | previous | next | Tom Wetmore | ttw@shore.net | LifeLines
The functions provide the standard mathematical and logical operations.
Function | Description |
---|---|
int add(int, int [,int]*) | Add, sub, mul and div do integer arithmetic. Add adds two to 32 integers and returns their sum. |
int sub(int, int) | Sub subtracts two numbers and returns their difference. |
int mul(int, int [,int]*) | Mul multiplies two to 32 integers and returns their product. |
int div(int, int) | Div divides two integers and returns their integer quotient. If the second argument to div or mod is zero, these functions return 0 and generate a run time error. |
int mod(int, int) | Mod divides two integers and returns their integer remainder. |
int exp(int, int) | Exp performs integer exponentiation, raising the first integer to the power of the second. |
int neg(int) | Neg negates its argument. |
void incr(int_v) | Incr and decr have each have a single integer variable for their parameters. Incr increments the integer variable by one. |
void decr(int_v) | Decr decrements the integer variable by one. |
bool and(bool, bool [,bool]*) | And logically ands two to 32 boolean values and returns their logical product. The arguments are evaluated from left to right until the final value becomes known. |
bool or(bool, bool [,bool]*) | Or logically ors two to 32 boolean values and returns their logical sum. The arguments are evaluated from left to right until the final value becomes known. |
bool not(bool) | Not returns the logical negation of its argument; it returns zero if its argument is non-zero, and it returns one if its argument is zero. |
bool eq(any, any) | Eq, ne, lt, le, gt and ge evaluate the six ordering relationships between two integers; the arguments are treated as integers regardless of their actual type. Eq checks for equality. |
bool ne(any, any) | Ne checks for non-equality. |
bool lt(any, any) | Lt checks the less than relationship. |
bool gt(any, any) | Gt checks the greater than relationship. |
bool le(any, any) | Le checks the less than or equal relationship. |
bool ge(any, any) | Ge checks the greater than or equal relationship. |
up | previous | next | Tom Wetmore | ttw@shore.net | LifeLines
1/1/00