Math and Miscellaneous Functions


FunctionDefinition

abs(x)

Returns the absolute value of x.

asc(a$)

Returns the ASCII code for the first element of a$.

atan(x)

Returns the arctangent of x.

cos(x)

Returns the cosine of x.

erl

Returns the line number of the last error.

eof(f)

Returns "true" if the file specified by f has reached its end.

err

Returns the error code of the last error.

eval(a$)

Evaluates a$.

exp(x)

Returns ex, where e = 2.7182818 ....

instr(a$, b$, c)

Returns the starting position of the string a$ within the string b$, starting from the optional c'th position in b$.

int(x)

Returns the largest integer less than x.

len(a$)

Returns the length of string a$.

log(x)

Returns the natural logarithm of x.

pi

Returns the value of pi.

posn(f)

Returns the current printing position in the file in the current line in the specified by f. If f is zero, the function returns the printing position of the terminal.

rnd

Returns a random number.

sgn(x)

Returns the sign of x.

sin(x)

Returns the sine of x.

sqrt(x)

Returns the square root of x.

tim

Returns the value of the system clock in seconds.

val(a$)

Returns the value of the number specified by the string a$.