Basic Functions

Index to Basic Functions

Function Type Description
ABS Function Returns absolute value of argument
ARG Function Sets up argument for CALL
ASC Function Returns decimal equivalent of string
ATN Function Returns Arc-Tangent of argument
BEEP Command Generates tone from sound generator
CALL Statement Calls machine-code subroutine
CHAR Function Specific character set in graphics mode
CHR$ Function Returns string equivalent of argument
CIRCLE Statement Draws circle on LCD
CLEAR Command Clears all variables
CLOSE Statement Closes files
CLS Command Clears the display screen
COM Command Activates/deactivates communications interrupt
CONT Command Continues execution of program
COS Function Returns cosine of argument
CRT Command Switches console to RS-232 port
CUROFF/CURON Command Switches cursor off and on
DATA Statement Holds data for use by program
DATE$ Function Returns current date string
DAY$ Function Returns current day string
DEFSEG Command Defines RAM page
DELETE Command Delete program lines
DIM Statement Initialises arrays
EDIT Command Enters Basic editor
END Statement Terminates execution
EOF I/O Function Detects end of file
ERR/ERL Function Returns error code/line number
ERROR Statement Simulates Basic error
EXP Function Returns e to the power of the argument
FILES Command Displays current files
FIX Function Strips argument to integer
FOR Statement Starts FOR…NEXT loop
FRE Statement Returns number of free bytes
GOSUB Statement Branches to subroutine
GOTO Statement Branches to alternative line
HELP Statement Initialises HELP key text pointer
IF Statement Conditional branch
IF…THEN…ELSE Statement Conditionally executes one of two statements
INCHR I/O Statement Returns single character from keyboard
INKEY I/O Statement Returns keyboard status
INKEY$ I/O Statement Returns single character from keyboard if input pending
INP I/O Statement Returns value at port address
INPUT Statement Returns data input from keyboard
INPUT USING Statement Validates data input from keyboard
INPUT I/O Statement Input data from file
INSTR Function Returns position of second string in first string
INT Function Returns integer part of argument
JSR$ Function Returns fixed-field string
KEY Command Initialises soft keys
KEY(n) Command Activates/deactivates soft keys
KILL Command Deletes file
LEFT$ Function Returns left part of string
LEN Function Returns lengths of string
LET Statement Assigns value of variable
LINCHR I/O Statement Returns single character from RS-232
LINE Statement Draws straight line
LINPUT I/O Statement Returns entry from RS-232
LIST Command Lists program at LCD
LLIST I/O Statement Lists program at RS-232
LLOAD Statement Loads program from RS-232
LN Function Returns natural logarithm
LOAD Command Loads program from file
LOC I/O Function Number of records read/written
LOCATE Command Sets cursor position
LOG Function Returns logarithm to base 10
LOPCHR I/O Statement Sends single character to RS-232
LPRINT I/O Statement Outputs to RS-232
LTRON I/O Statement Sends trace output to RS-232
MAXFILES I/O Statement Maximum no. of files to be opened
MID$ Function Returns mid portion of string
NAME Command Re-names file
NEW Command Initialises program space
NEXT Statement Concludes FOR.. .NEXT loop
ON BREAK I/O Statement Vectors program on BREAK key
ON COM I/O Statement Vectors program on communication
ON COMMS I/O Statement Vectors program on COMMS failure
ON ERROR Statement Vectors program on Syntax error
ON…GOSUB… Statement Conditional branch to subroutine
ON…GOTO… Statement Conditional branch
ON KEY I/O Statement Vectors program on soft keys
ON POWER I/O Statement Vectors program on POWER key
ON POWER RESUME I/O Statement Restarts program on power up
ON TIME$ Statement Vectors program on system time
OPCHR Statement Outputs 1 or more ASCII characters
OPEN I/O Statement Opens file for input/output
OUT I/O Statement Outputs to specified port
PEEK Statement Returns decimal byte value of memory locations
PI Statement Value of PI = 3.14159
POINT Statement Returns condition of pixel
POKE Statement Sets memory location with decimal value
POP Statement Returns value from machine code linkage/stack
POS Statement Returns cursor position
POWER n Statement Specify auto time off
POWER CONT Command Disables power off key and time outs
POWER OFF Command Switches HUNTER off
POWER OFF, RESUME Command Switches HUNTER off
PRINT Statement Outputs to LCD
PRINT# I/O Statement Output data to file
PSET/PRESET Statement Set/re-set pixel
PUSH Statement Puts value onto machine code linkage stack
READ Statement Returns value from DATA statement
REM Statement Enters remarks to Basic text
RESTORE Statement Resets Read pointer
RESUME Statement Restarts program at specified line
RETURN Statement Returns from subroutine
RIGHT$ Function Returns right portion of string
RND Function Produces random number
RUN Command Starts a program execution
SAVE Command Writes program to file
SCREEN Command Changes screen mode
SGN Function Returns a value for the sign of its argument
SIN Function Returns Sine of argument
SOUND Command Generates specified tone
SPACE$ Function Returns string of spaces
SPC Function Prints spaces
SQR Function Returns square root of its argument
SRCH Function Returns target string array position
STOP Statement Terminates program execution
STR$ Function Returns string equivalent of a numerical argument
STRING$ Function Returns string of characters
SWAP Function Exchange contents of two variables
TAB I/O Statement Formats Print output
TAN Function Returns tangent of argument
TIME$ Function Returns current time string
TRON/TROFF Command Turns trace on/off
VAL Function Returns numeric value of string
VARPTR Function Returns address of variable
WAND Command Defines wand decode software
WHILE…WEND Statement Conditional execution of statements
WINCHR I/O Statement Inputs a single character from an optical wand
WINPUT I/O Statement Inputs string from optical wand
WRITE# I/O Statement Write data to file