This page contains a list of (almost) every QBasic statement, function, and variable and a very brief description of its ability, purpose, or value. Feel free to print out this page for a quick reference while you are programming
| ABS(n) | Returns the absolute value of n |
| ASC(n$) | Returns the ASCII value of character n$ |
| ATN(n) | Returns the arc-tangent (inverse tangent) of n |
| BEEP | Emits a tone (.25 seconds at 1000Hz) |
| CDBL(n) | Returns the double-precision value of n |
| CHAIN | Calls a program for execution and transfers it variable values |
| CHDIR | Changes the current directory |
| CHR$(n) | Returns the string form of ASCII character n |
| CINT(n) | Returns the integer of n, rounding to the nearest integer |
| CIRCLE | Draws a circle (graphics mode only) |
| CLEAR | Resets all arrays and variables |
| CLOSE | Closes I/O device sessions |
| CLS | Clears the screen |
| COLOR | Sets the current drawing/text color |
| COMMON | Declares variables as global |
| COS(n) | Returns the cosine of angle n (n expressed in radians) |
| CSNG(n) | Returns the single-precision value of n |
| CSRLIN | Value of current row of text cursor |
| DATA | Defines data to be READ into variables |
| DATE$ | Value of current date, dd-mm-yyyy |
| DIM | Defines parameters for an array(s) |
| DRAW | Uses directional input to draw lines (graphics mode only) |
| END | Terminates program execution |
| ENVIRON | Modifies a parameter in the DOS Environment String Table |
| EOF(n) | Indicates end-of-file status for file #n |
| ERASE | Removes the existence of (specified) arrays from the program |
| ERROR | Manually triggers an error |
| EXP(n) | Returns e to the power of n |
| FIELD | Allocates space for variables in a random access I/O buffer |
| FILES | Lists all files within the current directory |
| FOR...NEXT | Performs a loop as specified |
| GET | Saves graphics from screen to memory. Loads a value from a random-access I/O device (file/COM) |
| GOTO | Transfers program control to a different line |
| HEX$(n) | Returns the string value of hexadecimal value of n |
| IF | Performs condition-based decisions |
| INKEY$ | Value of next character in the keyboard buffer |
| INP(n) | Returns value read from port n |
| INPUT | Inputs text to a variable from keyboard |
| INPUT# | Inputs value to a variable from I/O device |
| INPUT$(n) | Returns string value of n character from the keyboard buffer |
| INSTR(n$, m$) | Returns location of n$ within m$ |
| INT(n) | Returns integer of value n (truncated) |
| KEY | |
| KILL | Deletes a file |
| LEFT$(m$, n) | Returns string value of m$ from beginning to character n |
| LEN(n$) | Returns the number of characters in n$ |
| LET | Optional precursor to variable value assignment |
| LINE | Draws a line or rectangle (graphics mode only) |
| LINE INPUT | Inputs a line of text to a string variable, regardless of delimiters |
| LOCATE | Positions the text cursor |
| LPRINT | Sends text output to printer |
| LPRINT USING | Sends formatted output to printer |
| MID$(m$, n, p) | Returns string value of p characters in m$, starting at character n |
| MKDIR | Creates a directory |
| NAME | Renames a filename |
| OCT$(n) | Returns the string value of octal value of n |
| ON COM | Routes COM port event trapping |
| ON ERROR GOTO | Routes error event trapping |
| ON KEY | Routes key-input event trapping |
| ON PLAY | Routes play buffer underrun event trapping |
| ON STRIG | Routes joystick trigger event trapping |
| ON TIMER | Routes timer event trapping |
| OPEN | Opens an device for I/O |
| OPEN COM | Opens a COM port for I/O |
| OUT | Outputs a value to an output device |
| OPTION BASE | Declares the minimum value for array indecies |
| PAINT | Fills an area with a color (graphics mode only) |
| PALETTE | Defines RGB values for a color |
| PALETTE USING | Defines RGB values for multiple colors |
| PCOPY | Copies one video memory page to another. |
| PEEK | Returns the value within specified memory location |
| PLAY | Plays musical notes |
| PLAY(1) | Returns number of notes left in the background music buffer |
| POINT(x, y) | Returns color of pixel at position (x, y) (graphics mode only) |
| POKE | Places a value into specified memory location |
| POS(1) | Value of current column of text cursor |
| PRESET | Deactivates a pixel on the screen (graphics mode only) |
| PRINT | Outputs text to the screen |
| PRINT USING | Outputs formatted text to the screen |
| PRINT# | Outputs a value(s) to an I/O device |
| PRINT# USING | Outputs a formatted value(s) to an I/O device |
| PSET | Activates a pixel on the screen (graphics mode only) |
| PUT | Draws an image to the screen. Places a value(s) into a random-access I/O device (file/COM) |
| RANDOMIZE | Initializes the random number genorator |
| READ | Copies DATA values into a variable(s) |
| REM or ' | Nullifies a line of code (used for commenting) |
| RESET | Closes all files and deletes system buffers |
| RESTORE | Refreshes all DATA, allowing it to be READ again. |
| RETURN | Return to the origin point of a GOSUB call |
| RIGHT$(m$, n) | Returns string value of n characters from the end of m$ |
| RMDIR | Removes a directory |
| RND | Value of a random number |
| SCREEN | Sets the current screen mode |
| SCREEN() | Returns the ASCII value or color of a character location |
| SGN(n) | Returns positive/negative status of value n |
| SHELL | Runs a DOS shell |
| SIN(n) | Returns the sine value of angle n (n expressed in radians) |
| SOUND | Emits a specified frequency from the speakers for a specified duration |
| SPACE$(n) | Returns a string of n space characters |
| SQR(n) | Returns the square-root of n |
| STICK(n) | Returns position of joystick (code value n) |
| STOP | Performs the equivalent of Ctrl+Break, but controlled by the program |
| STR$(n) | Returns the string value of number n |
| STRIG(n) | Returns joystick button status (code value n) |
| STRING$(n, m$) | Returns a string of n m$ characters |
| SWAP | Exchanges the values of two variables |
| TAN(n) | Returns the tangent of angle n (n expressed in radians) |
| TIME$ | Value of the current system time |
| TIMER | Value of the number of seconds since midnight |
| VAL(n$) | Returns the numerical value of the number expressed n$ |
| VIEW | Defines the area in which graphics may be drawn. |
| WAIT | Pauses the program until a bit pattern is received from a port |
| WHILE...WEND | Performs a conditional loop |
| WIDTH | Sets the screen text width |
| WINDOW | Defines a coordinate map (graphics mode only) |
| WRITE | Writes a literal expression to the screen |
| WRITE# | Writes a literal expression to an I/O device |