Color BASIC - Functions

Functions

ABS(num) returns the absolute value of num
ASC(str) returns the ASCII code of the first character in str
CHR$(num) returns a single string character with the ASCII code num
EOF(device number) returns 0 if the file has data, or -1 if at the end of the file
INKEY$ returns a character if a key on the keyboard has been pressed, or null if nothing is pressed
INT(num) returns the integer portion of num
INSTR(startpos,search str,target str) searches for the first string, in the target str. startpos is optional.
JOYSTK(num) returns the position of the joystick axis (0-3) with a value from 0 to 63
LEFT$(str,num) returns the first ("left") num characters of string str
LEN(str) returns the length (in characters) of string str
MEM returns the available free memory in bytes
MID$(str,start num,length num) returns a sub-string of string str beginning at position start num and length num characters long. Can also reassign by adding ="newvalue"
PEEK(num) returns the value of the memory location num (0-65535)
POINT(x num,y num) returns the color of the semigraphics dot at position x numm (0-63) and y num (0-31)
RIGHT$(str,position num) returns the end ("right") portion of string str beginning at character position num
RND(number) returns a random number (integer) between 1 and num
SGN(num) returns the sign of a number num, 1 if positive, -1 if negative, 0 if 0
SIN(num) returns the sine of num in radians
STR$(num) returns a string of the number num
USR(num) calls a machine language subroutine whose address is stored in memory locations 275 and 276. num is passed to the routine, and a return value is assigned when the routine is done

Read more about this topic:  Color BASIC

Famous quotes containing the word functions:

    Empirical science is apt to cloud the sight, and, by the very knowledge of functions and processes, to bereave the student of the manly contemplation of the whole.
    Ralph Waldo Emerson (1803–1882)

    The English masses are lovable: they are kind, decent, tolerant, practical and not stupid. The tragedy is that there are too many of them, and that they are aimless, having outgrown the servile functions for which they were encouraged to multiply. One day these huge crowds will have to seize power because there will be nothing else for them to do, and yet they neither demand power nor are ready to make use of it; they will learn only to be bored in a new way.
    Cyril Connolly (1903–1974)

    In today’s world parents find themselves at the mercy of a society which imposes pressures and priorities that allow neither time nor place for meaningful activities and relations between children and adults, which downgrade the role of parents and the functions of parenthood, and which prevent the parent from doing things he wants to do as a guide, friend, and companion to his children.
    Urie Bronfenbrenner (b. 1917)