GW-BASIC for IBM PC compatible and Tandy computers ABS(n) n must be a numeric expression. Example: 100 PRINT ABS(7*(-5))
ASC (char) Returns numeric value of a single character.
ATN(n) n must be a numeric expression Example: 100 PRINT ATN(5)
AUTO Command
BEEP Statement To sound the speaker at 800 Hz (800 cycles per second) for 1/4 of a second. Examples: 100 BEEP 100 IF X>20 THEN BEEP Note: PRINT CHR$(7) has the same effect.
BLOAD Command To load an image file anywhere in user memory. Syntax: BLOAD filename[,offset] Comments: filename is a valid string expression containing the device and filename. offset is a valid numeric expression within the range of 0 to 65535. This is the offset into the segment, declared by the last DEF SEG statement, where loading is to start. If offset is omitted, the offset specified at BSAVE is assumed; that is, the file is loaded into the same location it was saved from. Example: 100 DEF SEG=&HB800 110 BLOAD "PICTURE", 0
BSAVE Command
CALL Statement
CDBL Function
CHAIN Statement
CHDIR Command
CHR$ Function
CINT Function
CIRCLE Statement
CLEAR Command To set all numeric variables to zero, all string variables to null, and to close all open files.
CLOSE Statement
CLS Statement To clear the screen. Syntax: CLS [n] Note: n is one of the following values: Value of n Effect 0 Clears the screen of all text and graphics 1 Clears only the graphics viewport 2 Clears only the text window Example: 100 CLS
COLOR Statement To select display colors Syntax: COLOR [foreground][,[background][,border]] Note: Color numbers are dependent on the SCREEN command mode used.
COM(n) Statement
COMMON Statement
CONT Command
COS Function
CSNG Function
CSRLIN Variable
CVD Function
CVI Function
CVS Function
DATA Statement
DATE$ Statement
DEF FN Statement
DEFINT Statement DEFDBL Statement DEFSNG Statement DEFSTR Statement
DEF SEG Statement DEF USR Statement
DELETE Command
DIM Statement
DRAW Statement
EDIT Command
END Statement
ENVIRON Statement
ENVIRON$ Function EOF Function ERASE Statement ERDEV($) Variables ERL Variable
ERR Variable
ERROR Statement
EXP Function
EXTERR Function
FIELD Statement FILES Command FIX Function
FOR Statement
FRE Function GET Statement (Files) GET Statement (Graphics) GOSUB-RETURN Statement GOTO Statement HEX$ Function IF Statement INKEY$ Variable INP Function
INPUT Statement INPUT# Statement INPUT$ Function
INSTR Function INT Function IOCTL Statement IOCTL$ Function
KEY Statement KEY(n) Statement
KILL Command LEFT$ Function LEN Function LET Statement LINE Statement LINE INPUT Statement LINE INPUT# Statement
LIST Command
LLIST Command
LOAD Command
LOC Function LOCATE Statement LOCK Statement LOF Function LOG Function LPOS Function LPRINT Statement LPRINT USING Statement LSET Statement MERGE Command MID$ Function MID$ Statement MKDIR Command MKD$ Function MKI$ Function MKS$ Function NAME Command NEXT Statement NEW Command OCT$ Function
ON COM(n) Statement ON KEY(n) Statement ON PEN Statement ON PLAY(n) Statement ON STRIG(n) Statement ON TIMER(n) Statement ON ERROR GOTO Statement ON-GOSUB Statement ON-GOTO Statement
OPEN Statement OPEN "COM(n) Statement OPTION BASE Statement OUT Statement PAINT Statement PALETTE Statement PALETTE USING Statement PCOPY Command
PEEK Function
PEN Statement and Function
PLAY Statement PLAY(n) Function
PMAP Function
POINT Function
POKE Statement
POS Function
PRESET Statement
PSET Statement
PRINT Statement PRINT USING Statement PRINT# Statement PRINT# USING Statement outputs to the display screen and optionally to an external file or device. ; can be used between numbers and strings Examples: 100 PRINT "HELLO WORLD" 100 PRINT A;" ";B
PUT Statement (Files)
PUT Statement (Graphics)
RANDOMIZE Statement
READ Statement REM Statement RENUM Command RESET Command RESTORE Statement RESUME Statement RETURN Statement RIGHT$ Function RMDIR Command RND Function RSET Statement RUN Command SAVE Command SCREEN Function SCREEN Statement SGN Function SHELL Statement SIN Function
SOUND freq,duration freq is the desired frequency in Hertz (cycles per second). freq is a numeric expression within the range of 37 to 32767. duration is the desired duration in clock ticks. Clock ticks occur 18.2 times per second. duration must be a numeric expression within the range of 0 to 65535. Examples: 100 SOUND 1000, 5 Relationships of Notes and Frequencies Note Frequency Note Frequency C 130.810 C* 523.250 D 146.830 D 587.330 E 164.810 E 659.260 F 174.610 F 698.460 G 196.000 G 783.990 A 220.000 A 880.000 B 246.940 B 987.770 C 261.630 C 1046.500 D 293.660 D 1174.700 E 329.630 E 1318.500 F 349.230 F 1396.900 G 392.000 G 1568.000 A 440.000 A 1760.000 B 493.880 B 1975.500 *Middle C.
SPACE$ Function
SPC Function
SQR Function
STICK Function To return the x and y coordinates of two joysticks. Syntax: x=STICK(n) Notes: x is a numeric variable for storing the result. n is a valid numeric expression within the range of 0 to 3. Value of n Coordinate Returned 0 x coordinate of joystick A. Stores the x and y values for both joysticks for the following 3 function calls. 1 y coordinate of joystick A. 2 x coordinate of joystick B. 3 y coordinate of joystick B.
STOP Statement STR$ Function STRIG Statement STRIG(n) Statement STRING$ Function SWAP Statement
SYSTEM Command
TAB Function
TAN Function
TIME$ Statement TIMER Function TROFF Command
TRON Command
UNLOCK Statement USR Function VAL Function VARPTR Function VARPTR$ Function VIEW Statement VIEW PRINT Statement
WAIT Statement
WHILE-WEND Statement WIDTH Statement
WINDOW Statement
WRITE Statement WRITE# Statement