1. Arithmetic Functions

ABS(X)

returns the absolute value of X

CEIL(X)

returns the least integer that is greater than or equal to X,

equivalent to -int(-X)

DIVIDE(X, Y, Q, R)

a subroutine that divides X by Y, and returns the quotient Q and

the remainder R

EPS(X)

returns the smallest number that can be added to X such that the

result differs from X

EXP(X)

returns the exponential function of X

FP(X)

returns the fractional part of X

INT(X)

returns the greatest integer less than or equal to X

IP(X)

returns the integer part of X

LOG(X)

returns the natural logarithm of X

LOG2(X)

returns the logarithm of X to the base 2

LOG10(X)

returns the logarithm of X to the base 10

MAX(X, Y)

returns the maximum value of X and Y

MAXNUM

returns the largest positive number in True BASIC (see

Appendix A)

MIN(X, Y)

returns the minimum value of X and Y

MOD(X, Y)

returns X modulo Y, equivalent to (X - (Y * int(X/Y)))

REMAINDER(X, Y)

returns the remainder left after dividing X by Y

RND

returns a random number in the range 0 <= RND < 1

ROUND(X)

returns X rounded to an integer

ROUND(X, N)

returns X rounded to N decimal places

SGN(X)

returns a value of 1 if X > 0, 0 if X = 0, -1 if X < 0

SQR(X)

returns the square root of X

TRUNCATE(X, N)

returns X truncated to N decimal places

 

2. Trigonometric Functions

ACOS(X)

returns the arccosine of X

ANGLE(X, Y)

returns counterclockwise angle between the X axis and a line

from the origin to point (X, Y)

ASIN(X)

returns the arcsine of X

ATN(X)

returns the arctangent of X

COS(X)

returns the cosine of angle X

COSH(X)

returns the hyperbolic cosine of angle X

COT(X)

returns the cotangent of angle X

CSC(X)

returns the cosecant of angle X

DEG(X)

converts an angle of X radians to degrees

PI

returns the value of p (equal to 3.14159...)

RAD(X)

converts an angle of X degrees to radians

SEC(X)

returns the secant of angle X

SIN(X)

returns the sine of angle X

SINH(X)

returns the hyperbolic sine of angle X

TAN(X)

returns the tangent of angle X

TANH(X)

returns the hyperbolic tangent of angle X

 

3. String Functions

CHR$(N)

returns a character corresponding to the ASCII value N

CPOS(A$, B$, N)

returns the position of the first occurrence of any character of B$

that is in A$, starting at character N in A$ and searching right

CPOSR(A$, B$, N)

returns the position of the last occurrence of any character of B$

that is in A$, starting at character N in A$ and searching left

LEN(A$)

returns the length of string A$ measured in characters

LCASE$(A$)

changes any uppercase characters in A$ to lowercase

LTRIM$(A$)

trims all leading spaces from A$

MAXLEN(A$)

returns the maximum length of the string variable A$

NCPOS(A$, B$, N)

returns the position of the first occurrence of any character of B$

that is not in A$, starting at character N in A$ and searching

right

NCPOSR(A$, B$, N)

returns the position of the last occurrence of any character of B$

that is not in A$, starting at character N in A$ and searching left

NUM(A$)

reverses the action of NUM$(N) by restoring the numeric value

stored in the string A$

NUM$(N)

converts a number N to an internal string representation that

cannot be displayed

ORD(A$)

returns the ASCII value of the first character in A$

POS(A$, B$)

returns the position of the first occurrence of B$ in A$

POS(A$, B$, N)

returns the position of the first occurrence of B$ in A$, starting

at character N in A$ and searching right

POSR(A$, B$, N)

returns the position of the last occurrence of B$ in A$, starting at

character N in A$ and searching left

REPEAT$(A$, N)

returns a string containing A$ repeated N times

RTRIM$(A$)

trims all trailing spaces from A$

STR$(N)

converts a number N to a string

TRIM$(A$)

trims all leading and trailing spaces from A$

UCASE$(A$)

changes any lowercase characters in A$ to uppercase

USING$(F$, V1, V2...)

returns a string containing variables V1, V2,... formatted by F$

VAL(A$)

converts string A$ to a number

 

4. Date and Time Functions

DATE

returns the current date in YYDDD format, where DDD is the

day of the year and YY is the year of the century

TIME

returns the current time measured in seconds since midnight

DATE$

returns the current date in YYYYMMDD format

TIME$

returns the current time in HH:MM:SS format

 

5. Array and Matrix Functions

CON

returns a numeric array whose elements are all one, as in

program statement MAT(A) = CON

DET(A)

returns the determinant of the numeric array A

DOT(A, B)

returns the dot product of the one-dimensional numeric arrays A

and B

IDN

returns a square numeric array that is an identity matrix, as in

statement MAT(A) = IDN

INV(A)

returns the inverse of the square numeric array A

LBOUND(A, N)

returns the lower bound in dimension N of array A

NUL$

returns a string array whose elements are all null strings, as in

statement MAT(A$) = NUL$

SIZE(A, N)

returns the number of elements in dimension N of array A

TRN(A)

returns the transpose of the numeric array A

UBOUND(A, N)

returns the upper bound in dimension N of array A

ZER

returns a numeric array all of whose elements are zeroes, as in

the statement MAT(A) = ZER

 

6. Miscellaneous Functions

EXLINE

returns the line number in a program where the most recent error

occurred

EXLINE$

returns a string giving the location in a program where the most

recent error occurred

EXTEXT$

returns the error message associated with the most recent error

trapped by an error handler

EXTYPE

returns the error number of the most recent error trapped by an

error handler

PEEK(addr)

returns a number that is the contents of the memory address in

bytes given by addr

POKE(addr, value)

a subroutine that accesses memory location addr and changes its

contents to value

TAB(N)

moves the printing cursor in a PRINT statement to column N

TAB(R, C)

moves the printing cursor in a PRINT statement to row R and

column C, the printing equivalent of the SET CURSOR R, C

statement