Keyword Reference - By usage
From QB64 Wiki
Download the QB64 WIKI for Offline Reference!.
If FireFox does not copy page example code correctly use another browser. There is nothing wrong with this WIKI!
If you have a USER "workaround" for this problem, please post a note in the QB64 Community forum so we can post it here.
For discussions about this WIKI goto the QB64 Community Development Forum.
Keywords beginning with _underscore can only be compiled in QB64.
Keywords without the underscore at the beginning should work with both QB 4.5 and QB64.
Graphics:
_A
- _ALPHA (function)
- _ALPHA32 (function)
- _AUTODISPLAY
_B
- _BACKGROUNDCOLOR (function)
- _BLEND (sub)
- _BLEND (function)
- _BLUE (function)
- _BLUE32 (function)
_C
- _CLEARCOLOR (sub)
- _CLEARCOLOR (function)
- _CLIP
- _COPYIMAGE (function)
- _COPYPALETTE (sub)
_D
- _DEFAULTCOLOR (function)
- _DEST (sub)
- _DEST (function)
- _DISPLAY (sub)
- _DISPLAY (function)
- _DONTBLEND (sub)
_F
- _FULLSCREEN (function)
- _FULLSCREEN (statement)
- _FREEIMAGE (sub)
_G
_H
- _HEIGHT (function)
_L
- _LOADIMAGE (function)
_N
- _NEWIMAGE (function)
_P
- _PALETTECOLOR (sub)
- _PALETTECOLOR (function)
- _PIXELSIZE (function)
- _PUTIMAGE (sub)
_R
- _RED (function)
- _RED32 (function)
- _RGB (function)
- _RGB32 (function)
- _RGBA (function)
- _RGBA32 (function)
_S
- _SETALPHA (sub)
- _SOURCE (sub)
- _SOURCE (function)
_W
C
D
- DRAW (statement)
G
L
- LINE (statement)
P
- PAINT (statement)
- PALETTE (statements)
- PCOPY (statement)
- PMAP (function)
- POINT (function)
- PRESET (statement)
- PSET (statement)
- PUT (graphics statement)
S
V
Fonts:
_F
- _FONT (sub)
- _FONT (function)
- _FONTHEIGHT (function)
- _FONTWIDTH (function)
- _FREEFONT (sub)
_L
- _LOADFONT (function)
_P
- _PRINTMODE (sub)
- _PRINTMODE (function)
- _PRINTSTRING (sub)
- _PRINTWIDTH (function)
Sound:
_S
- _SNDBAL
- _SNDCLOSE
- _SNDCOPY
- _SNDGETPOS
- _SNDLEN
- _SNDLIMIT
- _SNDLOOP
- _SNDOPEN
- _SNDPAUSE
- _SNDPAUSED
- _SNDPLAY
- _SNDPLAYCOPY
- _SNDPLAYFILE
- _SNDPLAYING
- _SNDSETPOS
- _SNDSTOP
- _SNDVOL
B
- BEEP (statement)
O
- ON PLAY (n) (statement)
P
S
- SOUND (statement)
User input:
_M
- _MOUSEBUTTON (function)
- _MOUSEHIDE (sub)
- _MOUSEINPUT (function)
- _MOUSEMOVEMENTX (function)
- _MOUSEMOVEMENTY (function)
- _MOUSESHOW (sub)
- _MOUSEWHEEL (function)
- _MOUSEX (function)
- _MOUSEY (function)
I
K
L
- LINE INPUT (statement)
O
- ON KEY (n) (statement)
- ON PEN (statement)
- ON STRIG (n) (statement)
P
- PEN (function)
- PEN (statement)
S
- SLEEP (statement)
- STICK (function)
- STRIG (function)
- STRIG (statements)
Text on screen:
C
I
- INPUT (statement)
K
L
- LINE INPUT
- LIST (statement)
- LOCATE (statement)
P
- POS (function)
- PRINT (statement)
- PRINT USING (statement)
S
- SCREEN (function)
- SPACE$ (function)
- SPC (function)
T
- TAB (function)
V
W
Controlling program flow:
C
D
- DO...LOOP (statement)
E
- ELSE
- ELSEIF
- END (statement)
- END IF (statement)
- END SELECT (statement)
- ERROR (error statement)
- EXIT (statement)
- EXIT DO (statement)
- EXIT FUNCTION (statement)
- EXIT SUB (statement)
F
- FOR...NEXT (statement)
G
I
L
N
O
- OFF
- ON
- ON COM (n) (statement)
- ON ERROR (statement)
- ON KEY (n) (statement)
- ON PEN (statement)
- ON PLAY (n) (statement)
- ON STRIG (n) (statement)
- ON TIMER (n) (statement)
- ON UEVENT (statement)
- ON...GOSUB (statement)
- ON...GOTO (statement)
R
S
- SELECT CASE (statement)
- SHELL (statement)
- SLEEP (statement)
- STEP
- STOP (statement)
- SYSTEM (statement)
T
- THEN
- TIMER (statement)
- TROFF (statement)
- TRON (statement)
U
W
- WAIT (statement)
- WEND (statement)
- WHILE (statement)
- WHILE...WEND (statement)
File I/O:
A
B
C
E
- EOF (file function)
F
- FIELD (statement)
- FILEATTR (function)
- FILES (statement)
- FOR (file statement) (to select file mode)
- APPEND (file mode)
- BINARY (file mode)
- INPUT (file mode)
- OUTPUT (file mode)
- RANDOM (file mode)
- FREEFILE (file function)
G
- GET (file I/O statement)
I
- INPUT (file mode)
- INPUT (file statement)
- INPUT$ (function)
- IOCTL (statement)
- IOCTL$ (function)
K
- KILL (statement)
L
- LINE INPUT (file statement)
- LOCK (statement)
- LOC (function)
- LOF (file function)
M
- MKDIR (statement)
N
- NAME (statement)
O
P
- PRINT (file statement)
- PRINT USING (file statement)
- PUT (file I/O statement)
R
S
- SEEK (function)
- SEEK (statement)
U
- UNLOCK (statement)
W
- WIDTH (statement)
- WRITE (file statement)
TCP/IP:
_C
- _CONNECTED (function)
- _CONNECTIONADDRESS (function)
_O
- _OPENCLIENT (function)
- _OPENCONNECTION (function)
- _OPENHOST (function)
C
- CLOSE (statement)
G
I
P
Time, date and delay:
_D
_L
D
- DATE$ (function)
- DATE$ (statement)
T
- TIME$ (function)
- TIME$ (statement)
- TIMER (function)
Error trapping:
_E
- _ERRORLINE (function)
E
O
- ON ERROR (statement)
R
- RESUME (statement)
Memory handling:
C
- _CLIPBOARD (function)
- _CLIPBOARD (statement)
D
F
- FRE (function)
P
S
V
Ports:
C
- COM (statement)
I
- INP (function)
O
Converting, defining and dimensioning variables:
QB64 keywords:
_B
_C
_D
_F
_I
_M
_P
_U
Qbasic keywords:
A
B
C
- CDBL (function)
- CDECL
- CHR$ (function)
- CINT (function)
- CLEAR (statement)
- CLNG (function)
- COMMON (statement)
- COMMON SHARED (statement)
- CONST (statement)
- CSNG (function)
- CVD (function)
- CVDMBF (function)
- CVI (function)
- CVL (function)
- CVS (function)
- CVSMBF (function)
D
- DEFDBL (statement)
- DEFINT (statement)
- DEFLNG (statement)
- DEFSNG (statement)
- DEFSTR (statement)
- DIM (statement)
- DOUBLE
H
- HEX$ (function)
I
L
M
- MKD$ (function)
- MKDMBF$ (function)
- MKI$ (function)
- MKL$ (function)
- MKS$ (function)
- MKSMBF$ (function)
O
- OCT$ (function)
- OPTION BASE (statement)
R
- REDIM (statement)
S
T
- TYPE (statement)
V
- VAL (function)
Getting information about variables:
I
- INSTR (function)
L
M
- MID$ (function)
S
- SGN (function)
U
- UBOUND (function)
Setting/clearing variables and manipulating them:
_R
A
E
- ERASE (array statement)
L
M
R
S
T
- TAB (function)
U
- UCASE$ (function)
Subs and functions, modules, libraries and external programs:
A
B
C
- CALL (statement)
- CALL ABSOLUTE (statement)
- CALLS (statement)
- CHAIN (statement)
D
- DECLARE (BASIC statement)
- DECLARE (non-BASIC statement)
- DEF FN (statement)
E
- END FUNCTION (statement)
- END SUB (statement)
F
- FUNCTION (statement)
G
- GOSUB (statement)
I
R
S
Mathematical Functions:
- _ROUND (QB64 function)
- + (addition operation)
- - (subtraction operation)
- * (multiplication operation)
- / (decimal point division operation)
- \ (integer division operation)
- ^ (exponential operation)
- ATN (function)
- CDBL (closest double rounding function)
- CINT (closest integer rounding function)
- CLNG (closest long integer rounding function)
- COS (function)
- CSNG (closest single rounding function)
- EXP (function)
- FIX (integer rounding function)
- INT (integer rounding function)
- LOG (function)
- MOD (integer remainder operation)
- SIN (function)
- SQR (function)
- TAN (function)
See also: Bit Logical Operations:
Bit Logical Operations:
Conditional Operations:
- AND (boolean)
- OR (boolean) (OR returns true if one or the other argument are true)
- XOR (boolean) (extended OR, only if either one argument or the other is true do XOR return true - not if both are true)
See also the category "Bit operations:" above (the operators can be used when comparing) but most importantly:
- XOR (XOR (boolean) explains the use when comparing values)
- NOT (reverses the condition, NOT a = 2 equals to a <> 2)
Data:
DOS/OS and Environment:
- _CLIPBOARD$ (statement)
- _CLIPBOARD$ (function)
- _DONTWAIT (SHELL action)
- _HIDE (SHELL action)
- _SCREENCLICK (simulates clicking the mouse at a position on the screen)
- _SCREENIMAGE (captures the current screen)
- _SCREENPRINT (simulates key presses)
Printer:
- LPOS (function)
- LPRINT (statement)
- LPRINT USING (statement)
- _PRINTIMAGE
Unclassified:
- _ICON (statement) (set the icon of the program)
- _TITLE (statement) (set the title of the program)
- _EXIT (function) (checks for external close signals, like the [X] button and CTRL-Break)
- RANDOMIZE (statement) (randomize RND function output)
- REM (statement) (remark, you can also use ')
- RND (function) (retrieves a random number)
- SIGNAL (statement) (reserved for OS/2 protected mode systems)
- TO (statement) (multi-purpose statement to specify a range)
Symbols:
- Print or file Formatting
- ; (Semicolon after a PRINT stops the invisible cursor at end of the printed value.)
- , (Comma after a PRINT tabs the invisible cursor past the end of the printed value.)
- Program Code Markers
- ' (Apostrophe denotes programmer comment, ignore code line or Metacommand. Same as using REM.)
- , (SUB or FUNCTION parameter separator. DATA value separator)
- : (Colons can be used to separate two statements on one code line.)
- () (math or conditional procedure order, a SUB or FUNCTION parameter holder or pass by value indicator)
- $ (prefix denotes a Qbasic Metacommand. REM or ' precede the commands)
- Variable Name Type Suffixes
- $ (STRING character type: 1 byte)
- ~ (_UNSIGNED numerical type when it precedes the 8 numerical suffixes below:) [QB64]
- % (INTEGER numerical type: 2 bytes)
- & (LONG numerical type: 4 bytes)
- && (_INTEGER64 numerical type: 8 bytes) [QB64] (32 or 64 bit PC only)
- ! (SINGLE numerical type: 4 bytes)
- # (DOUBLE numerical type: 8 bytes)
- ## (_FLOAT numerical type: 32 bytes) [QB64]
- ` (_BIT numerical type: 1 bit.) [QB64] (Key below tilde(~): CHR$(96))
- %% (_BYTE numerical type: 1 byte) [QB64]
- Numerical Base Prefixes
- &B (Binary base 2 Digits 0 or 1) [QB64]
- &O (Octal base 8 Digits 0 to 7)
- &H (Hexadecimal base 16: Digits 0 to F)
- + (Addition operator)
- - (Subtraction operator or sign)
- * (Multiplication operator)
- / (Normal division operator)
- \ (Long integer division operator)
- ^ (Exponential operator)
- MOD (Integer remainder division)
- = (Equal to condition)
- > (Greater than condition)
- < (Less than condition)
- <> (Not equal to condition)
- >= (Greater than or equal to condition)
- <= (Less than or equal to condition)
References:
Got a question about something?
Visit QB64 Community Forum