These functions all return numeric values, although some may operate on string arguments.
|
Function |
Description |
|
ABS(x) |
Returns absolute value of x. |
|
ASC(a$) |
Returns ASCII value in decimal of first character of a$. |
|
EXP(x) |
Returns the constant e (2.718218285) raised to the power x. |
|
FACT(x) |
Returns the factorial of x. |
|
FIX(x) |
Returns the integer part of the floating point value x. |
|
INT(x) |
Returns the largest integer less than or equal to x. (FIX(x) and INT(x) are same for positive numbers, but differ for negative numbers) |
|
LEN(a$) |
Returns length of string A$. Note that if a$ is actually a variable of type x, the returned length will always be the physical mapped size of the variable. Otherwise, for strings (type S), the returned length will be determined by the first null byte or the physical mapped length, whichever is smaller. |
|
LOG(x) |
Returns the natural (base e) log of x. |
|
LOG10(x) |
Returns the decimal logarithm of x. |
|
RND(x) |
Returns a pseudo-random number between 0 and 1, based on a "seed". If x is negative, it is used as the new "seed", otherwise the function returns the next number in the sequence determined by the previous "seed". (Starting a series from the same "seed" allows a program to repeat the sequence from a prior run, which is often useful for testing.) The RANDOMIZE statement may be used to start with a randomly selected "seed". |
|
SGN(x) |
Returns the sign of x: -1 if x < 0, 0 if x = 0, 1 if x > 0. |
|
SQR(x) |
Returns the square root of x. |
|
VAL(a$) |
Returns numeric value of the decimal representation in the string a$. Supports "hexadecade" date notation if OPTIONS=HEXDEC (which see in the A-Shell Setup Guide). Also supports the decimal point and thousands separator character definitions in the Language Definition File. A-Shell extension |