Keyword Reference - By usage: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
Tags: Manual revert Reverted
No edit summary
(68 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOEDITSECTION__
{| align="Right"
{|align="Right"
| __TOC__
|__TOC__
|}
|}
* [[Main Page|Main Page with Articles and Tutorials]]


* [[Metacommand|Alphabetical Metacommands list]]


* [[Keyword Reference - Alphabetical|Alphabetical Keywords list]]


[[QB64 FAQ|Go to Frequently Asked Questions about QB64]]
* [[Historic Pages]] ({{Text|Informations may be invalid now.|red}})


[[#Error Codes]]
* '''[[Keywords currently not supported by QB64]]'''


[[Keyword Reference - Alphabetical|Go to Alphabetical keywords]]
* '''[[Keywords currently not supported by QB64#Keywords_not_supported_in_Linux_or_macOS_versions|Keywords not supported in Linux or macOS versions]]'''


[[Keywords currently not supported by QB64]]
* [[QB64 FAQ|Frequently asked questions about QB64]]
 
[[Keywords currently not supported by QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords Not Supported in Linux or MAC versions]]




Line 20: Line 20:


<center>'''Arrays'''</center>
<center>'''Arrays'''</center>
* [[_DEFINE]] (statement)  {{text|defines a range of untyped variable names according to their first character as a datatype.}}
* [[_DEFINE]] (statement)  {{Text|defines a range of untyped variable names according to their first character as a datatype.}}
* [[_PRESERVE]] ([[REDIM]] option) {{text|preserves the existing element values when an array is resized.}}
* [[_PRESERVE]] ([[REDIM]] option) {{Text|preserves the existing element values when an array is resized.}}
* [[CLEAR]] (statement) {{text|resets all variable values and array element values to 0 or null [[STRING|strings]] and closes all open files.}}
* [[CLEAR]] (statement) {{Text|resets all variable values and array element values to 0 or null [[STRING|strings]] and closes all open files.}}
* [[DIM]] (statement) {{text|dimensions(sizes) a [[STATIC|static]] array and defines the type.}}
* [[DIM]] (statement) {{Text|dimensions(sizes) a [[STATIC|static]] array and defines the type.}}
* [[$DYNAMIC]] (metacommand) {{text|defines that all arrays are dynamic or changeable in size.}}
* [[$DYNAMIC]] (metacommand) {{Text|defines that all arrays are dynamic or changeable in size.}}
* [[ERASE]] (array statement) {{text|clears a [[STATIC|static]] array of all values and totally removes a [[$DYNAMIC|dynamic]] array.}}
* [[ERASE]] (array statement) {{Text|clears a [[STATIC|static]] array of all values and totally removes a [[$DYNAMIC|dynamic]] array.}}
* [[LBOUND]] (array function) {{text|returns the lowest valid index (lower boundary) of an [[arrays|array]].}}
* [[LBOUND]] (function) {{Text|returns the lowest valid index (lower boundary) of an [[arrays|array]].}}
* [[OPTION BASE]] (statement) {{text|sets the default starting index of an array to 0 or 1.}}
* [[OPTION BASE]] (statement) {{Text|sets the default starting index of an array to 0 or 1.}}
* [[REDIM]] (statement) {{text|re-dimensions the number of elements in a [[$DYNAMIC|dynamic]](resizeable) [[arrays|array]] and defines the type.}}
* [[REDIM]] (statement) {{Text|re-dimensions the number of elements in a [[$DYNAMIC|dynamic]](resizeable) [[arrays|array]] and defines the type.}}
* [[SHARED]] (statement) {{text|designates variable values that can be shared with sub-procedures without using parameters.}}
* [[SHARED]] (statement) {{Text|designates variable values that can be shared with sub-procedures without using parameters.}}
* [[STATIC]] (statement) {{text|defines a variable or list of variables that will retain their values after the sub-procedure is exited.}}
* [[STATIC]] (statement) {{Text|defines a variable or list of variables that will retain their values after the sub-procedure is exited.}}
* [[$STATIC]] (metacommand) {{text|defines that all arrays are static or unchangeable in size.}}
* [[$STATIC]] (metacommand) {{Text|defines that all arrays are static or unchangeable in size.}}
* [[SWAP]] (statement) {{text|trades the values of two numerical or string values or array elements.}}
* [[SWAP]] (statement) {{Text|trades the values of two numerical or string values or array elements.}}
* [[UBOUND]] (array function) {{text|returns the highest valid index (upper boundary) of an [[arrays|array]].}}
* [[UBOUND]] (function) {{Text|returns the highest valid index (upper boundary) of an [[arrays|array]].}}


: See also: [[Arrays]]
See also: [[Arrays]]




<center>'''Fixed Program DATA'''</center>
<center>'''Fixed read-only storage'''</center>
* [[DATA]] (statement) {{text|creates a field of built-in program data values separated by commas.}}
* [[DATA]] (statement) {{Text|creates a field of built-in program data values separated by commas.}}
* [[READ]] (statement) {{text|reads the DATA from the data field sequentially.}}
* [[READ]] (statement) {{Text|reads the DATA from the data field sequentially.}}
* [[RESTORE]] (statement) {{text|sets the data pointer to the start of all DATA or a specified DATA field.}}
* [[RESTORE]] (statement) {{Text|sets the data pointer to the start of all DATA or a specified DATA field.}}


* [[$EMBED]] (metacommand) {{Text|is used to embed any file's contents into the compiled executable.}}
* [[_EMBEDDED$]] (function) {{Text|recalls the contents of a file embedded using [[$EMBED]].}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== [[COLOR|Colors]] and Transparency ==
== [[COLOR|Colors]] and Transparency ==


* [[_ALPHA]] (function) {{text|returns the alpha channel transparency level of a color value used on a screen page or image.}}
* [[_ALPHA]] (function) {{Text|returns the alpha channel transparency level of a color value used on a screen page or image.}}
* [[_ALPHA32]] (function) {{text|function returns the alpha channel level of a 32 bit color value only.}}
* [[_ALPHA32]] (function) {{Text|function returns the alpha channel level of a 32 bit color value only.}}
* [[_BACKGROUNDCOLOR]] (function) {{text|returns the current background color.}}
* [[_BACKGROUNDCOLOR]] (function) {{Text|returns the current background color for an image handle or page.}}
* [[_BLEND]] (statement) {{text|turns on alpha blending for the current image or a specific one.}}
* [[_BLEND]] (statement) {{Text|turns on alpha blending for the current image or a specific one.}}
* [[_BLEND (function)]] {{text|returns if blending is enabled or disabled for the current window or a specified image handle.}}
* [[_BLEND (function)]] {{Text|returns if blending is enabled or disabled for the current window or a specified image handle.}}
* [[_BLINK]] (statement) {{text|statement turns blinking colors on/off in SCREEN 0}}
* [[_BLINK]] (statement) {{Text|statement turns blinking colors on/off in SCREEN 0}}
* [[_BLINK (function)]] {{text|returns -1 if enabled or 0 if disabled by [[_BLINK]] statement.}}
* [[_BLINK (function)]] {{Text|returns -1 if enabled or 0 if disabled by [[_BLINK]] statement.}}
* [[_BLUE]] (function) {{text|returns the palette intensity OR the blue component intensity of a 32-bit image color.}}
* [[_BLUE]] (function) {{Text|returns the palette intensity OR the blue component intensity of a 32-bit image color.}}
* [[_BLUE32]] (function) {{text|returns the blue component intensity of a 32-bit image color.}}
* [[_BLUE32]] (function) {{Text|returns the blue component intensity of a 32-bit image color.}}
* [[_CLEARCOLOR]] (statement) {{text|sets a specific color to be treated as transparent in an image}}
* [[_CLEARCOLOR]] (statement) {{Text|sets a specific color to be treated as transparent in an image}}
* [[_CLEARCOLOR (function)]] {{text|returns the current transparent color of an image.}}
* [[_CLEARCOLOR (function)]] {{Text|returns the current transparent color of an image.}}
* [[_COPYPALETTE]] (statement) {{text|copies the color palette intensities from one image to another image or screen page.}}
* [[_COLORCHOOSERDIALOG]] (function) {{Text|Displays a standard color picker dialog box and returns a 32-bit RGBA color selected by the user.}}
* [[_DEFAULTCOLOR]] (function) {{text|returns the current default text color for an image handle or page.}}
* [[_COPYPALETTE]] (statement) {{Text|copies the color palette intensities from one image to another image or screen page.}}
* [[_DONTBLEND]] (statement) {{text|turns off alpha blending for an image handle.}}
* [[_DEFAULTCOLOR]] (function) {{Text|returns the current default (text/drawing) color for an image handle or page.}}
* [[_GREEN]] (function) {{text|returns the palette index OR the green component intensity of a 32-bit image.}}
* [[_DONTBLEND]] (statement) {{Text|turns off alpha blending for an image handle.}}
* [[_GREEN32]] (function) {{text|returns the green component intensity of a 32-bit image color.}}
* [[_GREEN]] (function) {{Text|returns the palette index OR the green component intensity of a 32-bit image.}}
* [[_NEWIMAGE]] (function) {{text|prepares a custom sized program [[SCREEN]] or page surface that can use 256 or 32 bit colors.}}
* [[_GREEN32]] (function) {{Text|returns the green component intensity of a 32-bit image color.}}
* [[_PALETTECOLOR]] (statement) {{text|sets the color value of a palette entry of an image using 256 color modes or less (4 or 8 BPP).}}
* [[_NEWIMAGE]] (function) {{Text|prepares a custom sized program [[SCREEN]] or page surface that can use 256 or 32 bit colors.}}
* [[_PALETTECOLOR (function)]] {{text|returns the 32 bit attribute color setting of an image or screen page handle's palette.}}
* [[_PALETTECOLOR]] (statement) {{Text|sets the color value of a palette entry of an image using 256 color modes or less (4 or 8 BPP).}}
* [[_PIXELSIZE]] (function) {{text|returns the color depth (Bits Per Pixel) of an image.}}
* [[_PALETTECOLOR (function)]] {{Text|returns the 32 bit attribute color setting of an image or screen page handle's palette.}}
* [[_RED]] (function) {{text|returns the palette index OR the red component intensity of a 32-bit screen.}}
* [[_PIXELSIZE]] (function) {{Text|returns the color depth (Bits Per Pixel) of an image.}}
* [[_RED32]] (function) {{text|returns the red component intensity of a 32-bit image color.}}
* [[_RED]] (function) {{Text|returns the palette index OR the red component intensity of a 32-bit screen.}}
* [[_RGB]] (function) {{text|returns the closest palette attribute index OR the [[LONG]] 32 bit color value in 32 bit screens.}}
* [[_RED32]] (function) {{Text|returns the red component intensity of a 32-bit image color.}}
* [[_RGB32]] (function) {{text|returns the [[LONG]] 32 bit color value only.}}
* [[_RGB]] (function) {{Text|returns the closest palette attribute index OR the [[LONG]] 32 bit color value in 32 bit screens.}}
* [[_RGBA]] (function) {{text|returns the closest palette attribute index OR the [[LONG]] 32 bit color value in [[_ALPHA]] screens.}}
* [[_RGB32]] (function) {{Text|returns the [[LONG]] 32 bit color value only.}}
* [[_RGBA32]] (function) {{text|returns the [[LONG]] 32 bit [[_ALPHA]] color value only.}}
* [[_RGBA]] (function) {{Text|returns the closest palette attribute index OR the [[LONG]] 32 bit color value in [[_ALPHA]] screens.}}
* [[_SETALPHA]] (statement) {{text|sets the alpha channel transparency level of some or all of the pixel colors of an image.}}
* [[_RGBA32]] (function) {{Text|returns the [[LONG]] 32 bit [[_ALPHA]] color value only.}}
* [[_SETALPHA]] (statement) {{Text|sets the alpha channel transparency level of some or all of the pixel colors of an image.}}




* [[CLS]] (statement) {{text|clears the screen and can set the background color in QB64.}}
* [[CLS]] (statement) {{Text|clears the screen and can set the background color in QB64.}}
* [[COLOR]] (statement) {{text|sets the current text color attribute or [[_RGB]] value to be used or background colors in some screen modes.}}
* [[COLOR]] (statement) {{Text|sets the current text color attribute or [[_RGB]] value to be used or background colors in some screen modes.}}
* [[INP]] (function) {{text|returns the RGB color intensity values from color port register &H3C9 for a specific attributes.}}
* [[INP]] (function) {{Text|returns the RGB color intensity values from color port register &H3C9 for a specific attributes.}}
* [[OUT]] (statement) {{text|sets the color port access mode and sets the RGB color intensity values using &H3C9.}}
* [[OUT]] (statement) {{Text|sets the color port access mode and sets the RGB color intensity values using &H3C9.}}
* [[PALETTE]] (statement) {{text|sets the Red, Green and Blue color attribute intensities using a RGB multiplier calculation.}}
* [[PALETTE]] (statement) {{Text|sets the Red, Green and Blue color attribute intensities using a RGB multiplier calculation.}}
* [[PALETTE USING]] (statement) {{text|sets the color intensity settings using a designated [[arrays|array]].}}
* [[PALETTE USING]] (statement) {{Text|sets the color intensity settings using a designated [[arrays|array]].}}
* [[POINT]] (function) {{text|returns a pixel coordinate color attribute or the [[LONG]] [[_RGB]] color value of a 32 bit color.}}
* [[POINT]] (function) {{Text|returns a pixel coordinate color attribute or the [[LONG]] [[_RGB]] color value of a 32 bit color.}}
* [[PRESET]] (statement) {{text|sets a pixel coordinate to the background color or a color specified.}}
* [[PRESET]] (statement) {{Text|sets a pixel coordinate to the background color or a color specified.}}
* [[PSET]] (statement) {{text|sets a pixel coordinate a specified color or uses the current color when not designated.}}
* [[PSET]] (statement) {{Text|sets a pixel coordinate a specified color or uses the current color when not designated.}}
* [[SCREEN]] {{text|sets the screen mode of a program which may determine the number of colors available in legacy modes.}}
* [[SCREEN]] {{Text|sets the screen mode of a program which may determine the number of colors available in legacy modes.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


==[[Console Window]]==
 
* [[$CONSOLE]] (QB64 [[Metacommand]]) {{text|creates a console window throughout the program.}}
== [[Console Window]] ==
* [[_CONSOLE]] (statement) {{text|can be used to turn the console window OFF or ON or designate it as [[_DEST]] _CONSOLE for output.}}
* [[$CONSOLE]] (metacommand) {{Text|creates a console window that can be used throughout a program.}}
* [[_CONSOLETITLE]] (statement) {{Text|creates a title for the console window using a literal or variable [[STRING|string]].}}
* [[_CONSOLE]] (statement) {{Text|used to turn a console window OFF or ON or to designate [[_DEST]] _CONSOLE for output.}}
* [[$SCREENHIDE]] (QB64 [[Metacommand]]) {{text|hides the program window throughout the program until [[$SCREENSHOW]] is used.}}
* [[_CONSOLEINPUT]] (function) {{Text|fetches input data from a [[$CONSOLE]] window to be read later (both mouse and keyboard)}}
* [[_SCREENHIDE]] {{text|hides the main program window in a section of code until [[_SCREENSHOW]] is used.}}
* [[_CINP]] (function) {{Text|Returns a key code from $CONSOLE input}}
* [[$SCREENSHOW]] (QB64 [[Metacommand]]) {{text|displays the main program window throughout the program after [[$SCREENHIDE]] has been used.}}
* [[_CONSOLECURSOR]] (statement) {{Text|is used to switch the text cursor in [[Console Window]]s off/on or change its size.}}
* [[_SCREENSHOW]] {{text|displays the main program window in a section of code after [[_SCREENHIDE]] has been used.}}
* [[_CONSOLEFONT]] (statement) {{Text|is used to change the text font used in [[Console Window]]s or change its size.}}
* [[SHELL (function)|SHELL (QB64 function)]] {{text|executes a DOS command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}}
* [[_CONSOLETITLE]] (statement) {{Text|creates the title of the console window using a literal or variable [[STRING|string]].}}
* [[_SHELLHIDE]] (function) {{text|hides a DOS command or call to another program. Returns codes sent by [[END]] or [[SYSTEM]].}}
* [[$SCREENHIDE]] (metacommand) {{Text|hides the program window throughout the program until [[$SCREENSHOW]] is used.}}
* [[_SCREENHIDE]] {{Text|hides the main program window in a section of code until [[_SCREENSHOW]] is used.}}
* [[$SCREENSHOW]] (metacommand) {{Text|displays the main program window throughout the program after [[$SCREENHIDE]] has been used.}}
* [[_SCREENSHOW]] {{Text|displays the main program window in a section of code after [[_SCREENHIDE]] has been used.}}
* [[SHELL (function)]] {{Text|executes a DOS command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}}
* [[_SHELLHIDE]] (function) {{Text|hides a DOS command or call to another program. Returns codes sent by [[END]] or [[SYSTEM]].}}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Conditional Operations ==
== Conditional Operations ==




* [[AND (boolean)]] {{text|returns True if all of the arguments are True.}}
* [[AND (boolean)]] {{Text|returns True if all of the arguments are True.}}
* [[NOT]] (boolean) {{text|returns the opposite condition of an argument.}}
* [[_ANDALSO]] (boolean) {{Text|performs short-circuiting logical conjunction on two expressions.}}
* [[OR (boolean)]] {{text|returns True if one of the arguments is True.}}
* [[NOT]] (boolean) {{Text|returns the opposite condition of an argument.}}
* [[XOR (boolean)]] {{text|returns True if only one of two arguments are True.}}
* [[OR (boolean)]] {{Text|returns True if one of the arguments is True.}}
* [[_ORELSE]] (boolean) {{Text|performs short-circuiting inclusive logical disjunction on two expressions.}}
* [[XOR (boolean)]] {{Text|returns True if only one of two arguments are True.}}
* [[_NEGATE]] (boolean) {{Text|returns True when a [[boolean]] evaluation is False and vice-versa.}}




{{RelationalOperationsTable}}
<center>See also: [[#Logical_Bitwise_Operations|Logical Operations]] and [[Relational Operations]]</center>




<center>See also: [[#Logical Bitwise Operations|Logical Operations]] and [[Relational Operations]]</center>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
 


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Definitions and Variable Types ==
== Definitions and Variable Types ==


* [[_BIT]] {` numerical [[TYPE|type]]) {{text|values of 0 (bit off) or -1 (bit on). [[_UNSIGNED|Unsigned]] of 0 or 1.}}
* [[_BIT]] {` numerical [[TYPE|type]]) {{Text|values of 0 (bit off) or -1 (bit on). [[_UNSIGNED|Unsigned]] of 0 or 1.}}
* [[_BYTE]] {%% numerical [[TYPE|type]]) {{text|values from -128 to 127 (one byte or 8 [[_BIT]]s). [[_UNSIGNED|Unsigned]] from 0 to 255.}}
* [[_BYTE]] {%% numerical [[TYPE|type]]) {{Text|values from -128 to 127 (one byte or 8 [[_BIT]]s). [[_UNSIGNED|Unsigned]] from 0 to 255.}}
* [[_DEFINE]] (statement)  {{text|defines a range of untyped variable names according to their first character as a datatype.}}
* [[_DEFINE]] (statement)  {{Text|defines a range of untyped variable names according to their first character as a datatype.}}
* [[_FLOAT]] {## numerical [[TYPE|type]]) {{text|values offer the maximum floating-point decimal precision available using QB64.}}
* [[_FLOAT]] {## numerical [[TYPE|type]]) {{Text|values offer the maximum floating-point decimal precision available using QB64.}}
* [[_INTEGER64]] (&& numerical [[TYPE|type]]) {{text|values -9223372036854775808 to 9223372036854775807. [[_UNSIGNED|Unsigned]] to 18446744073709551615.}}
* [[_INTEGER64]] (&& numerical [[TYPE|type]]) {{Text|values -9223372036854775808 to 9223372036854775807. [[_UNSIGNED|Unsigned]] to 18446744073709551615.}}
* [[_MEM]] (variable type) {{text|contains read only dot elements for the OFFSET, SIZE, TYPE and ELEMENTSIZE of a block of memory.}}
* [[_MEM]] (variable type) {{Text|contains read only dot elements for the OFFSET, SIZE, TYPE and ELEMENTSIZE of a block of memory.}}
* [[_OFFSET]](%& variable type) {{text|can store any memory offset integer value when using [[DECLARE LIBRARY]] or [[_MEM]]ory only.}}
* [[_OFFSET]](%& variable type) {{Text|can store any memory offset integer value when using [[DECLARE LIBRARY]] or [[_MEM]]ory only.}}
* [[_UNSIGNED]] {~ numerical [[TYPE|type]]) {{text|defines an integer numerical value as being positive only in QB64.}}
* [[_UNSIGNED]] {~ numerical [[TYPE|type]]) {{Text|defines an integer numerical value as being positive only in QB64.}}
* [[COMMON]] (statement) {{text|shares common variable values with other Linked or [[CHAIN]]ed programs.}}
* [[COMMON]] (statement) {{Text|shares common variable values with other Linked or [[CHAIN]]ed programs.}}
* [[COMMON SHARED]] (statement) {{text|shares common variable values with all sub-procedures and other Linked or CHAINed programs.}}
* [[COMMON SHARED]] (statement) {{Text|shares common variable values with all sub-procedures and other Linked or CHAINed programs.}}
* [[CONST]] (statement) {{text|defines one or more named numeric or string shared values which can  not change in a program.}}
* [[CONST]] (statement) {{Text|defines one or more named numeric or string shared values which can  not change in a program.}}
* [[DEFDBL]] (statement) {{text|defines undefined variable starting letters AS [[DOUBLE]] variables instead of the [[SINGLE]] type default.}}
* [[DEFDBL]] (statement) {{Text|defines undefined variable starting letters AS [[DOUBLE]] variables instead of the [[SINGLE]] type default.}}
* [[DEFINT]] (statement) {{text|defines undefined variable starting letters AS [[INTEGER]] variables instead of the [[SINGLE]] type default.}}
* [[DEFINT]] (statement) {{Text|defines undefined variable starting letters AS [[INTEGER]] variables instead of the [[SINGLE]] type default.}}
* [[DEFLNG]] (statement) {{text|defines undefined variable starting letters AS [[LONG]] variables instead of the [[SINGLE]] type default.}}}}
* [[DEFLNG]] (statement) {{Text|defines undefined variable starting letters AS [[LONG]] variables instead of the [[SINGLE]] type default.}}}}
* [[DEFSNG]] (statement) {{text|defines undefined variable starting letters AS [[SINGLE]] variables instead of the [[SINGLE]] type default.}}
* [[DEFSNG]] (statement) {{Text|defines undefined variable starting letters AS [[SINGLE]] variables instead of the [[SINGLE]] type default.}}
* [[DEFSTR]] (statement) {{text|defines undefined variable starting letters AS [[STRING]] variables instead of the [[SINGLE]] type default.}}
* [[DEFSTR]] (statement) {{Text|defines undefined variable starting letters AS [[STRING]] variables instead of the [[SINGLE]] type default.}}
* [[DIM]] {{text|defines a variable or size a [[$STATIC|static]] array and can define the type of value it returns.}}
* [[DIM]] {{Text|defines a variable or size a [[$STATIC|static]] array and can define the type of value it returns.}}
* [[DOUBLE]] {# numerical [[TYPE|type]]) {{text|an 8 byte floating decimal variable type with numerical values up to 15 decimal places.}}
* [[DOUBLE]] {# numerical [[TYPE|type]]) {{Text|an 8 byte floating decimal variable type with numerical values up to 15 decimal places.}}
* [[INTEGER]] {% numerical [[TYPE|type]]) {{text|a two byte variable type with values from -32768 to 32767. [[_UNSIGNED|Unsigned]] to 65535.}}
* [[INTEGER]] {% numerical [[TYPE|type]]) {{Text|a two byte variable type with values from -32768 to 32767. [[_UNSIGNED|Unsigned]] to 65535.}}
* [[LONG]] {& numerical [[TYPE|type]]) {{text|Integer values can be from -2147483648 to 2147483647. [[_UNSIGNED]] values to 4294967295.}}
* [[LONG]] {& numerical [[TYPE|type]]) {{Text|Integer values can be from -2147483648 to 2147483647. [[_UNSIGNED]] values to 4294967295.}}
* [[OPTION BASE]] (statement) {{text|sets the default starting index of an [[arrays|array]] to 0 or 1.}}
* [[OPTION BASE]] (statement) {{Text|sets the default starting index of an [[arrays|array]] to 0 or 1.}}
* [[REDIM]] {{text|defines and sizes a [[$DYNAMIC|dynamic]](changeable) array and can define the type of value returned.}}
* [[REDIM]] {{Text|defines and sizes a [[$DYNAMIC|dynamic]](changeable) array and can define the type of value returned.}}
* [[SHARED]] (statement) {{text|designates variable values that can be shared with sub-procedures without using [[SUB]] parameters.}}
* [[SHARED]] (statement) {{Text|designates variable values that can be shared with sub-procedures without using [[SUB]] parameters.}}
* [[SINGLE]] (! numerical [[TYPE|type]]) {{text|a 4 byte floating decimal variable type with numerical values up to 7 decimal places.}}
* [[SINGLE]] (! numerical [[TYPE|type]]) {{Text|a 4 byte floating decimal variable type with numerical values up to 7 decimal places.}}
* [[STATIC]] (statement) {{text|defines a variable or list of variables that will retain their values after the sub-procedure is exited.}}
* [[STATIC]] (statement) {{Text|defines a variable or list of variables that will retain their values after the sub-procedure is exited.}}
* [[STRING]] ($ variable type) {{text|one byte text variable with [[ASCII]] code values from 0 to 255.}}
* [[STRING]] ($ variable type) {{Text|one byte text variable with [[ASCII]] code values from 0 to 255.}}
* [[TYPE]] (statement) {{text|defines variable types that can hold more than one variable type value of a fixed byte length.}}
* [[TYPE]] (statement) {{Text|defines variable types that can hold more than one variable type value of a fixed byte length.}}




Line 155: Line 166:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== External Disk and API calls ==
== External Disk and API calls ==
* [[_ACCEPTFILEDROP]] (statement) {{text|turns a program window into a valid drop destination for dragging files from Windows Explorer.}}
* [[_ACCEPTFILEDROP]] (statement) {{Text|turns a program window into a valid drop destination for dragging files from Windows Explorer.}}
* [[_DEVICE$]] (function) {{text|returns a [[STRING]] expression listing device names and input types of system input devices.}}
* [[_DEVICE$]] (function) {{Text|returns a [[STRING]] expression listing device names and input types of system input devices.}}
* [[_DEVICES]] (function) {{text|returns the number of input devices found on a computer system.}}
* [[_DEVICES]] (function) {{Text|returns the number of input devices found on a computer system.}}
* [[_DIREXISTS]] (function) {{text|returns -1 if the directory folder name [[STRING|string]] parameter exists. Zero if it does not.}}
* [[_DIREXISTS]] (function) {{Text|returns -1 if the directory folder name [[STRING|string]] parameter exists. Zero if it does not.}}
* [[_DROPPEDFILE]] (function) {{text| returns the list of items (files or folders) dropped in a program's window after [[_ACCEPTFILEDROP]] is enabled.}}
* [[_DROPPEDFILE]] (function) {{Text| returns the list of items (files or folders) dropped in a program's window after [[_ACCEPTFILEDROP]] is enabled.}}
* [[_CLIPBOARD$ (statement)]] {{text|sends [[STRING]] data to the Clipboard.}}
* [[_CLIPBOARD$]] (statement) {{Text|sends [[STRING]] data to the Clipboard.}}
* [[_CLIPBOARD$]] (function) {{text|returns the current contents of the Clipboard as a [[STRING|string]].}}
* [[_CLIPBOARD$ (function)]] {{Text|returns the current contents of the Clipboard as a [[STRING|string]].}}
* [[_CLIPBOARDIMAGE (function)]] {{text|pastes an image from the clipboard into a new QB64 image in memory.}}
* [[_CLIPBOARDIMAGE (function)]] {{Text|pastes an image from the clipboard into a new QB64 image in memory.}}
* [[_CLIPBOARDIMAGE]] (statement) {{text|copies a valid QB64 image to the clipboard.}}
* [[_CLIPBOARDIMAGE]] (statement) {{Text|copies a valid QB64 image to the clipboard.}}
* [[_CWD$]] (function) {{text|returns the current working directory path as a [[STRING]].}}
* [[_CWD$]] (function) {{Text|returns the current working directory path as a [[STRING]].}}
* [[_DONTWAIT]] (SHELL action) {{text|allows the program to continue without waiting for the other program to close.}}
* [[_DONTWAIT]] (SHELL action) {{Text|allows the program to continue without waiting for the other program to close.}}
* [[_FILEEXISTS]] (function) {{text|returns -1 if the file name [[STRING|string]] parameter exists. Zero if it does not.}}
* [[_FILEEXISTS]] (function) {{Text|returns -1 if the file name [[STRING|string]] parameter exists. Zero if it does not.}}
* [[_FINISHDROP]] (statement) {{text| resets [[_TOTALDROPPEDFILES]] and clears the [[_DROPPEDFILE]] list of items (files/folders).}}
* [[_FINISHDROP]] (statement) {{Text| resets [[_TOTALDROPPEDFILES]] and clears the [[_DROPPEDFILE]] list of items (files/folders).}}
* [[_HIDE]] (SHELL action) {{text|hides the DOS screen output during a shell.}}
* [[_HIDE]] (SHELL action) {{Text|hides the DOS screen output during a shell.}}
* [[_LASTBUTTON]] (function) {{text|returns the number of buttons available on a specified number device listed by [[DEVICE$]].}}  
* [[_LASTBUTTON]] (function) {{Text|returns the number of buttons available on a specified number device listed by [[DEVICE$]].}}
* [[_OS$]] (function) {{text| returns the QB64 compiler version in which the program was compiled as [WINDOWS], [LINUX] or [MACOSX] and [32BIT] or [64BIT].}}
* [[_OPENFILEDIALOG$]] (function) {{Text|Displays a standard dialog box that prompts the user to open a file.}}
* [[_SCREENCLICK]]  {{text|simulates clicking the mouse at a position on the screen to get focus.}}
* [[_OS$]] (function) {{Text| returns the QB64 compiler version in which the program was compiled as [WINDOWS], [LINUX] or [MACOSX] and [32BIT] or [64BIT].}}
* [[_SCREENIMAGE]]  {{text|captures the current desktop screen image.}}
* [[_SAVEFILEDIALOG$]] (function) {{Text|Displays a standard dialog box that prompts the user to save a file.}}
* [[_SCREENPRINT]]  {{text|simulates keyboard entries on the desktop.}}  
* [[_SCREENCLICK]]  {{Text|simulates clicking the mouse at a position on the screen to get focus.}}
* [[_SHELLHIDE]] (function) {{text|executes a DOS command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}}
* [[_SCREENIMAGE]]  {{Text|captures the current desktop screen image.}}
* [[_STARTDIR$]] (function) {{text|returns the user's program calling path as a [[STRING]].}}
* [[_SCREENPRINT]]  {{Text|simulates keyboard entries on the desktop.}}
* [[_TOTALDROPPEDFILES]] (function) {{text| returns the number of items (files or folders) dropped in a program's window after [[_ACCEPTFILEDROP]] is enabled.}}
* [[_SELECTFOLDERDIALOG$]] (function) {{Text|Displays a dialog box that enables the user to select a folder (directory).}}
* [[_SHELLHIDE]] (function) {{Text|executes a DOS command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}}
* [[_STARTDIR$]] (function) {{Text|returns the user's program calling path as a [[STRING]].}}
* [[_TOTALDROPPEDFILES]] (function) {{Text| returns the number of items (files or folders) dropped in a program's window after [[_ACCEPTFILEDROP]] is enabled.}}




* [[CHDIR]] (statement) {{text|changes the program path to a new path.}}
* [[CHDIR]] (statement) {{Text|changes the program path to a new path.}}
* [[COMMAND$]] (function) {{text|returns command line parameters sent when a program is started.}}
* [[COMMAND$]] (function) {{Text|returns command line parameters sent when a program is started.}}
* [[ENVIRON]] (statement) {{text|temporarily sets an environmental key/pair value.}}
* [[ENVIRON]] (statement) {{Text|temporarily sets an environmental key/pair value.}}
* [[ENVIRON$]] (function) {{text|returns the environmental settings of the computer.}}
* [[ENVIRON$]] (function) {{Text|returns the environmental settings of the computer.}}
* [[_ENVIRONCOUNT]] (function) {{text|returns the number of key/value pairs currently exist in the environment table.}}
* [[_ENVIRONCOUNT]] (function) {{Text|returns the number of key/value pairs currently exist in the environment table.}}
* [[FILES]] (statement) {{text|displays a specified list of files.}}
* [[_FILES$]] (function) {{Text|returns a file or directory name that matches the specified pattern.}}
* [[MKDIR]] (statement) {{text|creates a new directory folder in the designated path.}}
* [[FILES]] (statement) {{Text|displays a specified list of files.}}
* [[NAME]] (statement) {{text|renames a file.}}
* [[_FULLPATH$]] (function) {{Text|returns an absolute or full path name for the specified relative path name.}}
* [[RMDIR]] (statement) {{text|removes an empty directory folder from the specified path.}}
* [[MKDIR]] (statement) {{Text|creates a new directory folder in the designated path.}}
* [[SHELL]] (statement) {{text|performs a command line operation in DOS.}}
* [[NAME]] (statement) {{Text|renames a file.}}
* [[SHELL (function)|SHELL (QB64 function)]] {{text|executes a DOS command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}}
* [[RMDIR]] (statement) {{Text|removes an empty directory folder from the specified path.}}
* [[SHELL]] (statement) {{Text|performs a command line operation in DOS.}}
* [[SHELL (function)]] {{Text|executes a DOS command or calls another program. Returns codes sent by [[END]] or [[SYSTEM]].}}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Error Codes ==


The following table describes the error codes that are reported by the '''QB64''' compiler, as well as possible causes and solutions:
== Error Trapping ==
 
{| border="1" cellpadding="2"
|-
! colspan="6"|QB/64 Error Codes
|-
! Code || Description || Common cause/Resolution || QB64 Differences
|-
|  1 || [[NEXT]] without [[FOR]] || Missing loop end or look for a missing [[END IF]] or [[END SELECT]] statement. || none
|-
|  2 || Syntax error || Mistyped keyword statements or puctuation errors can create syntax errors. || none
|-
|  3 || [[RETURN]] without [[GOSUB]] || Place sub-procedure line label after program [[END]] or [[EXIT]] in a [[SUB]]-procedure.|| none
|-
|  4 || Out of DATA || A [[READ]] has read past the end of [[DATA]]. Use [[RESTORE]] to reset to data start. . || none
|-
|  5 || Illegal function call || A parameter passed does not match the function type or exceeds certain function limitations. See [[Illegal Function]]. || none
|-
|  6 || Overflow || A numerical value has exceeded the limitations of a [[Variable Types|variable type]]. || none
|-
|  7 || Out of memory || A module has exceeded the 64K memory limitation of QB. Try breaking the code up to smaller modules.|| no limit
|-
|  8 || Label not defined || [[GOTO]] or [[GOSUB]] tries to branch to a label that doesn't exist. || none
|-
|  9 || Subscript out of range || An [[Arrays|array's]] [[UBOUND|upper]] or [[LBOUND|lower]] [[DIM|dimensioned]] boundary has been exceeded. || none
|-
| 10 || Duplicate definition || You can't define a variable twice with [[DIM]], the first time a variable is used it is also defined. || none
|-
| 11 || Division by zero || You cannot divide any value by zero! Even using [[MOD]]. || none
|-
| 12 || Illegal in direct mode || A statement (like [[DIM]]) in the Immediate window wasn't allowed. ||  N/A
|-
| 13 || Type mismatch || A [[SUB]] or [[FUNCTION]] parameter does not match the procedure Declaration. || none
|-
| 14 || Out of [[STRING|string]] space || A module has exceeded the 32767 text character limit. Use SUB print procedures. || no limit.
|-
| 16 || String formula too complex. || A string formula was too long or [[INPUT]] statement requested more than 15 strings || N/A
|-
| 17 || Cannot continue. || The program while debugging has changed in a way that it cannot continue. || no debug
|-
| 18 || Function not defined. || The function used by the program must be defined. Did you include the .bi file while using a library? || none
|-
| 19 || No [[RESUME]]. || Use [[RESUME]] at the end of the [[ON ERROR]] [[GOTO]] routine, not [[RETURN]]. || none
|-
| 20 || RESUME without error. || [[RESUME]] can only be used in an error handler called by [[ON ERROR]] [[GOTO]]. || none
|-
| 24 || Device timeout. || Use DS0 (DSzero)in the [[OPEN COM]] statement to avoid modem timeouts. || none
|-
| 25 || Device fault. || Device not connected or does not exist. || none
|-
| 26 || [[FOR]] without [[NEXT]]. || Missing loop end or look for a missing [[END IF]] or [[END SELECT]] statement. || none
|-
| 27 || Out of paper || A printer paper error when using [[LPRINT]]. || none
|-
| 29 || [[WHILE]] without [[WEND]]. || [[WEND]] must end a [[WHILE]] loop. Otherwise look for missing [[END IF]] or [[END SELECT]] || none
|-
| 30 || [[WEND]] without [[WHILE]] || Missing loop end or look for a missing [[END IF]] or [[END SELECT]] statement. || none
|-
| 33 || Duplicate label || Line numbers or labels cannot be used twice in a procedure. || none
|-
| 35 || Subprogram not defined. || Often occurs when the Quickbasic Library is not used with [[CALL ABSOLUTE]] or [[INTERRUPT]] or a [[SUB]] or [[FUNCTION]] procedure has not been created for a [[CALL]]. || none
|-
| 37 || Argument-count mismatch || The number of sub-procedure [[parameters]] do not match the call. || none
|-
| 38 || Array not defined || [[Arrays]] using more than 10 elements must be [[DIM|DIMensioned]]. || none
|-
| 40 || Variable required. || [[LEN]] cannot read literal numerical values. A [[GET]] or [[PUT]] statement must specify a variable when reading or writing a file opened in [[BINARY]] mode. || none
|-
| 50 || [[FIELD]] overflow. || A [[FIELD]] statement tried to allocate more bytes than were specified for the record length of a random access file. || none
|-
| 51 || Internal error. || An internal malfunction occured in QuickBASIC or QB64. || none
|-
| 52 || Bad file name or number. || The filename must follow the rules for filenames in the OS and use filenumbers from 1 and 255. Use [[FREEFILE]] to avoid duplicate [[OPEN]] file numbers. || none
|-
| 53 || File not found. || File not in current directory or path. Use [[_FILEEXISTS]] to verify file names. || none
|-
| 54 || Bad file mode. || File access mode does not match a current [[OPEN]] file procedure. || none
|-
| 55 || File already open. || [[CLOSE]] a file to open it in a different mode. || none
|-
| 56 || FIELD statement active. || '''WRITEME''' || N/A
|-
| 57 || Device I/O error. || '''WRITEME''' || N/A
|-
| 58 || File already exists. || The filename specified in the [[NAME]] statement was identical to a file that already exists. || none
|-
| 59 || Bad record length. || Record length exceeds 32767 bytes or is 0 || none
|-
| 61 || Disk full. || The amount of data to write to the disk was more than the free space available, remove some files you don't need and try again. || none
|-
| 62 || Input past end of file. || Check for the end of file with [[EOF]] when reading from a file. || none
|-
| 63 || Bad record number. || [[GET]] read exceeds number of records in a [[RANDOM]] file. || none
|-
| 64 || Bad file name || File name contains illegal characters or exceeds 12 characters. || none
|-
| 67 || Too many files || Over 15 files are open in QBasic. || none
|-
| 68 || Device unavailable. || Device does not exist, busy or not connected. || none
|-
| 69 || Communication-buffer overflow. || '''WRITEME''' || N/A
|-
| 70 || Permission denied || A file or port is in use on a network, blocked, read only or locked. || none
|-
| 71 || Disk not ready. || Disk is busy or has no media. || none
|-
| 72 || Disk-media error. || Improper media format or bad data. || none
|-
| 73 || Feature unavailable. || Based on the DOS version available. || none
|-
| 74 || Rename across disks. || '''WRITEME''' || N/A
|-
| 75 || Path/File access error. || File or path cannot be accessed. || none
|-
| 76 || Path not found. || Path is not access-able or does not exist. Use [[_DIREXISTS]] to check paths.|| none
|-
| 97 || (no error message) || Can be used to trigger an error trap event with [[ERROR]] 97, nothing else will cause this error, so create your own errors for [[ON ERROR]]. || none
|-
|}
<center>'''N/A means Not Available or Not Applicable to QB64.'''</center>




{| border="1" cellpadding="2"
* [[_ASSERT]] (statement) {{Text|Performs debug tests.}}
! colspan="6"|QB64 Error Codes
* [[$ASSERTS]] (metacommand) {{Text|Enables the [[_ASSERT]] macro}}
|-
* [[$CHECKING]] (metacommand) {{Text|turns off or on error event checking and strips error code from compiled programs.}}
! Code || Description || Common cause/resolution || QB Differences
* [[_ERRORLINE]] (function) {{Text|returns the actual text code line where a program error occurred.}}
|-
* [[ERR]] (function) {{Text|returns the error code number of the last error to occur.}}
| 258 || Invalid handle || Zero or bad handle values cannot be used by the QB64 procedure creating the error. || N/A
* [[ERROR]] (statement) {{Text|simulates a program error based on the error code number used.}}
|}
* [[ERL]] (function) {{Text|returns the closest line number before an error occurred if the program uses them.}}
* [[ON ERROR]] (statement) [[GOTO]] {{Text|sends the program to a line number or label when an error occurs. Use to avoid program errors.}}
* [[RESUME]] (statement) {{Text|error statement sends the program to the [[NEXT]] code line or a designated line number or label .}}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Error Trapping ==


== Event Trapping ==


* [[_ASSERT]] (statement) {{text|Performs debug tests.}}
* [[_AUTODISPLAY]] (statement) {{Text|enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].}}
* [[$ASSERTS]] (metacommand) {{text|Enables the [[_ASSERT]] macro}}* [[$CHECKING]] ([[Metacommand]]) {{text|turns off or on error event checking and strips error code from compiled programs.}}
* [[_DELAY]] (statement) {{Text|suspends program execution for a [[SINGLE]] value of seconds down to milliseconds.}}
* [[_ERRORLINE]] (function) {{text|returns the actual text code line where a program error occurred.}}  
* [[_DISPLAY]] (statement) {{Text|turns off automatic display while only displaying the screen changes when called.}}
* [[ERR]] (function) {{text|returns the error code number of the last error to occur.}}
*[[_EXIT (function)]] {{Text|prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
* [[ERROR]] (statement) {{text|simulates a program error based on the error code number used.}}
*[[_FREETIMER]] (function) {{Text|returns a free TIMER number for multiple [[ON TIMER(n)]] events.}}
* [[ERL]] (function) {{text|returns the closest line number before an error occurred if the program uses them.}}
* [[_MOUSEINPUT]] (function) {{Text|reports any changes to the mouse status and MUST be used to read those changes.}}
* [[ON ERROR]] (statement) [[GOTO]] {{text|sends the program to a line number or label when an error occurs. Use to avoid program errors.}}
* [[_SHELLHIDE]] (function) {{Text|returns the code sent by a program exit using [[END]] or [[SYSTEM]] followed by an [[INTEGER]] value.}}
* [[RESUME]] (statement) {{text|error statement sends the program to the [[NEXT]] code line or a designated line number or label .}}
 


<center>See the [[ERROR Codes|Error Code Table]] reference.</center>


* [[OFF]] {{Text|turns event checking off and does not remember subsequent events.}}
* [[ON]] {{Text|turns event checking on.}}
* [[ON ERROR]] [[GOTO]] (event statement) {{Text|executes when a program error occurs}}
* [[ON KEY(n)]] (event statement) {{Text|executes when a keypress or keypress combination occurs.}}
* [[ON TIMER(n)]] (event statement) {{Text|executes when a timed event occurs. QB64 can use multiple numbered timers.}}
* [[ON...GOSUB]] (event statement) {{Text|branches to a line number or label according to a numerical ordered list of labels.}}
* [[ON...GOTO]] (event statement) {{Text|branches to a line number or label according to a numerical ordered list of labels.}}
* [[STOP]] {{Text|suspends event checking and remembers subsequent events that are executed when events are turned back on.}}
* [[TIMER (function)]] {{Text|returns the number of seconds past the previous midnite down to a QB64 accuracy of one millisecond.}}
* [[TIMER]] (statement) {{Text|enables, turns off or stops timer event trapping. In QB64 TIMER(n) FREE can free multiple timers. }}
* [[WAIT]] (statement) {{Text|normally used to delay program display execution during or after vertical retrace periods.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Event Trapping ==
* [[_AUTODISPLAY]] (statement) {{text|enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].}}
* [[_DELAY]] (statement) {{text|suspends program execution for a [[SINGLE]] value of seconds down to milliseconds.}}
* [[_DISPLAY]] (statement) {{text|turns off automatic display while only displaying the screen changes when called.}}
*[[_EXIT (function)]] {{text|prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
*[[_FREETIMER]] (function) {{text|returns a free TIMER number for multiple [[ON TIMER(n)]] events.}}
* [[_MOUSEINPUT]] (function) {{text|reports any changes to the mouse status and MUST be used to read those changes.}}
* [[_SHELLHIDE]] (function) {{text|returns the code sent by a program exit using [[END]] or [[SYSTEM]] followed by an [[INTEGER]] value.}}


== File Input and Output ==


* [[OFF]] {{text|turns event checking off and does not remember subsequent events.}}
* [[_DIREXISTS]] (function) {{Text|returns -1 if the directory folder name [[STRING|string]] parameter exists. Zero if it does not.}}
* [[ON]] {{text|turns event checking on.}}
* [[_FILEEXISTS]] (function) {{Text|returns -1 if the file name [[STRING|string]] parameter exists. Zero if it does not.}}
* [[ON ERROR]] [[GOTO]] (event statement) {{text|executes when a program error occurs}}
* [[_READFILE$]] (function) {{Text|directly read a file into a string, without [[OPEN]]/[[CLOSE]] overhead.}}
* [[ON KEY(n)]] (event statement) {{text|executes when a keypress or keypress combination occurs.}}
* [[_WRITEFILE]] (statement) {{Text|directly write a string into a file, without [[OPEN]]/[[CLOSE]] overhead.}}
* [[ON TIMER(n)]] (event statement) {{text|executes when a timed event occurs. QB64 can use multiple numbered timers.}}
* [[ACCESS]] (clause) {{Text|used in a networking [[OPEN]] statement to allow READ or WRITE access to files.}}
* [[ON...GOSUB]] (event statement) {{text|branches to a line number or label according to a numerical ordered list of labels.}}
* [[APPEND]] (file mode) {{Text|opens or creates a file that can be appended with data at the end.}}
* [[ON...GOTO]] (event statement) {{text|branches to a line number or label according to a numerical ordered list of labels.}}
* [[BINARY]] (file mode) {{Text|opens or creates a file that can be byte accessed using both [[GET]] and [[PUT]].}}
* [[STOP]] {{text|suspends event checking and remembers subsequent events that are executed when events are turned back on.}}
* [[BLOAD]] (statement) {{Text|opens a binary file and loads the contents to a specific array.}}
* [[TIMER]] (function) {{text|returns the number of seconds past the previous midnite down to a QB64 accuracy of one millisecond.}}
* [[BSAVE]] (statement) {{Text|creates a binary file that holds the contents of a specified array.}}
* [[TIMER (statement)]] {{text|enables, turns off or stops timer event trapping. In QB64 TIMER(n) FREE can free multiple timers. }}
* [[CHDIR]] (statement) {{Text|changes the program path to a new path.}}
* [[WAIT]] (statement) {{text|normally used to delay program display execution during or after vertical retrace periods.}}
* [[CLOSE]] (statement) {{Text|closes a specified file or all open files.}}
* [[EOF]] (function) {{Text|returns -1 when the end of a file has been read.}}
* [[FIELD]] (statement) {{Text|creates a [[STRING]] type definition for a random-access file buffer.}}
* [[FILES]] (statement) {{Text|displays a specified list of files.}}
* [[FREEFILE]] (function) {{Text|returns a file access number that is currently not in use.}}
* [[GET]] (file I/O statement) {{Text|reads file data by byte or record positions.}}
* [[INPUT (file mode)]] {{Text|only [[OPEN]]s existing sequential files for program INPUT.}}
* [[INPUT (file statement)]] {{Text|reads sequential file data that was created using PRINT # or WRITE #. }}
* [[INPUT$]] (function) {{Text|reads a specific number of bytes from random or binary files.}}
* [[KILL]] (statement) {{Text|deletes a specified file without asking for verification. Remove empty folders with [[RMDIR]].}}
* [[LINE INPUT (file statement)]] {{Text|reads an entire text row of printed sequential file data.}}
* [[LOC]] (function) {{Text|finds the current file location or size of a [[OPEN COM|COM]] port receive buffer.}}
* [[LOCK]] (statement) {{Text|prevents access to a file.}}
* [[LOF]] (function) {{Text|returns the size of a file in bytes.}}
* [[MKDIR]] (statement) {{Text|creates a new folder in the designated path.}}
* [[NAME]] (statement) {{Text|renames a file [[AS]] a new file name.}}
* [[OPEN]] (file I/O statement) {{Text|opens a specified file FOR an access mode with a set reference number.}}
* [[OUTPUT]] (file mode) {{Text|opens or creates a new file that holds no data.}}
* [[PRINT (file statement)]] {{Text|writes text and numerical data into a file.}}
* [[PRINT USING (file statement)]] {{Text|writes template formatted text into a file.}}
* [[PUT]] (file I/O statement) {{Text|writes data into a [[RANDOM]] or [[BINARY]] file by byte or record position.}}
* [[RANDOM]] (file mode) {{Text|opens or creates a file that can be accessed using both [[GET]] and [[PUT]].}}
* [[RESET]] (statement) {{Text|closes all files and writes the directory information to a diskette.}}
* [[RMDIR]] (statement) {{Text|removes an empty folder from the specified path.}}
* [[SEEK (function)]] {{Text|returns the current read or write byte position in a file.}}
* [[SEEK]] (statement) {{Text|sets the current read or write byte position in a file.}}
* [[UNLOCK]] (statement) {{Text|unlocks access to a file.}}
* [[WIDTH]] (statement) {{Text|sets the text width of a file.}}
* [[WRITE (file statement)]] {{Text|writes numerical and string data to a sequential file using comma separators.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== File Input and Output ==


* [[_DIREXISTS]] (function) {{text|returns -1 if the directory folder name [[STRING|string]] parameter exists. Zero if it does not.}}
== Checksums and Hashes ==
* [[_FILEEXISTS]] (function) {{text|returns -1 if the file name [[STRING|string]] parameter exists. Zero if it does not.}}
* [[_ADLER32]] (function) {{Text|Returns the Adler-32 checksum of any arbitrary string.}}
* [[ACCESS]] (clause) {{text|used in a networking [[OPEN]] statement to allow READ or WRITE access to files.}}
* [[_CRC32]] (function) {{Text|Returns the Crc-32 checksum of any arbitrary string.}}
* [[APPEND]] (file mode) {{text|opens or creates a file that can be appended with data at the end.}}
* [[_MD5$]] (function) {{Text|Returns the MD5 hash value of any arbitrary string.}}
* [[BINARY]] (file mode) {{text|opens or creates a file that can be byte accessed using both [[GET]] and [[PUT]].}}
* [[BLOAD]] (statement) {{text|opens a binary file and loads the contents to a specific array.}}
* [[BSAVE]] (statement) {{text|creates a binary file that holds the contents of a specified array.}}
* [[CHDIR]] (statement) {{text|changes the program path to a new path.}}
* [[CLOSE]] (statement) {{text|closes a specified file or all open files.}}
* [[EOF]] (file function) {{text|returns -1 when the end of a file has been read.}}
* [[FIELD]] (statement) {{text|creates a [[STRING]] type definition for a random-access file buffer.}}
* [[FILEATTR]] (function) {{text|can return a file's current file mode or DOS handle number.}}
* [[FILES]] (statement) {{text|displays a specified list of files.}}
* [[FREEFILE]] (file function) {{text|returns a file access number that is currently not in use.}}
* [[GET]] (file I/O statement) {{text|reads file data by byte or record positions.}}
* [[INPUT (file mode)]] {{text|only [[OPEN]]s existing sequential files for program INPUT.}}
* [[INPUT (file statement)]] {{text|reads sequential file data that was created using PRINT # or WRITE #. }}
* [[INPUT$]] (function) {{text|reads a specific number of bytes from random or binary files.}}
* [[KILL]] (statement) {{text|deletes a specified file without asking for verification. Remove empty folders with [[RMDIR]].}}
* [[LINE INPUT (file statement)]] {{text|reads an entire text row of printed sequential file data.}}
* [[LOC]] (function) {{text|finds the current file location or size of a [[COM]] port receive buffer.}}
* [[LOCK]] (statement) {{text|prevents access to a file.}}
* [[LOF]] (file function) {{text|returns the size of a file in bytes.}}
* [[MKDIR]] (statement) {{text|creates a new folder in the designated path.}}
* [[NAME]] (statement) {{text|renames a file [[AS]] a new file name.}}
* [[OPEN]] (file I/O statement) {{text|opens a specified file FOR an access mode with a set reference number.}}
* [[OUTPUT]] (file mode) {{text|opens or creates a new file that holds no data.}}
* [[PRINT (file statement)]] {{text|writes text and numerical data into a file.}}
* [[PRINT USING (file statement)]]  {{text|writes template formatted text into a file.}}
* [[PUT]] (file I/O statement) {{text|writes data into a [[RANDOM]] or [[BINARY]] file by byte or record position.}}
* [[RANDOM]] (file mode) {{text|opens or creates a file that can be accessed using both [[GET]] and [[PUT]].}}
* [[RESET]] (statement) {{text|closes all files and writes the directory information to a diskette.}}
* [[RMDIR]] (statement) {{text|removes an empty folder from the specified path.}}
* [[SEEK]] (function) {{text|returns the current read or write byte position in a file.}}
* [[SEEK (statement)]] {{text|sets the current read or write byte position in a file.}}
* [[UNLOCK]] (statement) {{text|unlocks access to a file.}}
* [[WIDTH]] (statement) {{text|sets the text width of a file.}}
* [[WRITE (file statement)]] {{text|writes numerical and string data to a sequential file using comma separators.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Fonts ==
== Fonts ==


* [[_FONT (function)]] {{text|creates a new alphablended font handle from a designated image handle}}
* [[_FONT (function)]] {{Text|creates a new alphablended font handle from a designated image handle}}
* [[_FONT]] (statement) {{text|sets the current [[_LOADFONT]] function font handle to be used by [[PRINT]] or [[_PRINTSTRING]].}}
* [[_FONT]] (statement) {{Text|sets the current [[_LOADFONT]] function font handle to be used by [[PRINT]] or [[_PRINTSTRING]].}}
* [[_FONTHEIGHT]] (function) {{text|returns the font height of a font handle created by [[_LOADFONT]].}}
* [[_FONTHEIGHT]] (function) {{Text|returns the font height of a font handle created by [[_LOADFONT]].}}
* [[_FONTWIDTH]] (function) {{text|returns the font width of a MONOSPACE font handle created by [[_LOADFONT]].}}
* [[_FONTWIDTH]] (function) {{Text|returns the font width of a MONOSPACE font handle created by [[_LOADFONT]].}}
* [[_FREEFONT]] (statement) {{text|frees a font handle value from memory}}
* [[_FREEFONT]] (statement) {{Text|frees a font handle value from memory}}
* [[_LOADFONT]] (function) {{text|loads a TrueType font (.TTF) file of a specific size and style and returns a font handle value.}}
* [[_LOADFONT]] (function) {{Text|loads a TrueType font (.TTF) file of a specific size and style and returns a font handle value.}}
* [[_MAPUNICODE]] (statement) {{text|maps a [[Unicode]] value to an [[ASCII]] character code value.}}
* [[_MAPUNICODE]] (statement) {{Text|maps a [[Unicode]] value to an [[ASCII]] character code value.}}
* [[_PRINTMODE (function)]] {{text|returns the present _PRINTMODE status as a numerical value.}}
* [[_PRINTMODE (function)]] {{Text|returns the present _PRINTMODE status as a numerical value.}}
* [[_PRINTMODE]] (statement) {{text|sets the text or [[_FONT]] printing mode on a background image when using [[PRINT]] or [[_PRINTSTRING]].}}
* [[_PRINTMODE]] (statement) {{Text|sets the text or [[_FONT]] printing mode on a background image when using [[PRINT]] or [[_PRINTSTRING]].}}
:*_KEEPBACKGROUND {{text|(1): Text background transparent. Only the text is displayed over anything behind it.}}
:*_KEEPBACKGROUND {{Text|(1): Text background transparent. Only the text is displayed over anything behind it.}}
:*_ONLYBACKGROUND {{text|(2): Text background is only displayed. Text is transparent to anything behind it.}}
:*_ONLYBACKGROUND {{Text|(2): Text background is only displayed. Text is transparent to anything behind it.}}
:*_FILLBACKGROUND {{text|(3): Text and background block anything behind them like a normal [[PRINT]]. Default setting.}}
:*_FILLBACKGROUND {{Text|(3): Text and background block anything behind them like a normal [[PRINT]]. Default setting.}}
* [[_PRINTSTRING]] (statement) {{text|prints text or custom font strings using graphic column and row coordinate positions.}}
* [[_PRINTSTRING]] (statement) {{Text|prints text or custom font strings using graphic column and row coordinate positions.}}
* [[_PRINTWIDTH]] (function) {{text|returns the width in pixels of the [[_FONT]] or text [[STRING|string]] that a program will print.}}
* [[_PRINTWIDTH]] (function) {{Text|returns the width in pixels of the [[_FONT]] or text [[STRING|string]] that a program will print.}}
* [[PRINT]] (statement) {{text|prints numeric or [[STRING|string]] expressions to the program screen.}}
* [[PRINT]] (statement) {{Text|prints numeric or [[STRING|string]] expressions to the program screen.}}
* [[PRINT USING]] (statement) {{text|prints template formatted numeric or string values to the program screen.}}
* [[PRINT USING]] (statement) {{Text|prints template formatted numeric or string values to the program screen.}}
* [[WRITE]] (screen I/O statement) {{text|writes a comma-separated list of values to the screen.}}
* [[_UCHARPOS]] (function) {{Text|calculates the starting pixel positions of every character of a (unicode) text string.}}
* [[_UFONTHEIGHT]] (function) {{Text|returns the global glyph height (incl. ascender/descender) of a loaded font.}}
* [[_ULINESPACING]] (function) {{Text|returns the vertical line spacing (distance between two consecutive baselines) in pixels.}}
* [[_UPRINTSTRING]] (statement) {{Text|locates and prints a (unicode) text [[STRING|string]] using graphic coordinates.}}
* [[_UPRINTWIDTH]] (function) {{Text|returns the pixel width of a (unicode) text string to be printed using [[_UPRINTSTRING]].}}
* [[WRITE]] (screen I/O statement) {{Text|writes a comma-separated list of values to the screen.}}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Game Controller Input (Joystick) ==
== Game Controller Input (Joystick) ==
* [[_AXIS]] (function) {{text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distance from device axis center 0.}}
* [[_AXIS]] (function) {{Text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distance from device axis center 0.}}
* [[_BUTTON]] (function) {{text|returns -1 when a device button is pressed and 0 when button is released.}}
* [[_BUTTON]] (function) {{Text|returns -1 when a device button is pressed and 0 when button is released.}}
* [[_BUTTONCHANGE]] (function) {{text|returns -1 when a device button has been pressed and 1 when released. Zero indicates no change.}}
* [[_BUTTONCHANGE]] (function) {{Text|returns -1 when a device button has been pressed and 1 when released. Zero indicates no change.}}
* [[_DEVICE$]] (function) {{text|returns a [[STRING]] expression listing a designated numbered input device name and types of input.}}
* [[_DEVICE$]] (function) {{Text|returns a [[STRING]] expression listing a designated numbered input device name and types of input.}}
* [[_DEVICEINPUT]] (function) {{text|returns the [[_DEVICES]] number of an [[_AXIS]], [[_BUTTON]] or [[_WHEEL]] event.}}
* [[_DEVICEINPUT]] (function) {{Text|returns the [[_DEVICES]] number of an [[_AXIS]], [[_BUTTON]] or [[_WHEEL]] event.}}
* [[_DEVICES]] (function) {{text|returns the number of input devices found on a computer system including the keyboard and mouse.}}
* [[_DEVICES]] (function) {{Text|returns the number of input devices found on a computer system including the keyboard and mouse.}}
* [[_LASTAXIS]] (function) {{text|returns the number of axis available on a specified number device listed by [[_DEVICE$]].}}
* [[_LASTAXIS]] (function) {{Text|returns the number of axis available on a specified number device listed by [[_DEVICE$]].}}
* [[_LASTBUTTON]] (function) {{text|returns the number of buttons available on a specified number device listed by [[DEVICE$]].}}  
* [[_LASTBUTTON]] (function) {{Text|returns the number of buttons available on a specified number device listed by [[DEVICE$]].}}
* [[_LASTWHEEL]] (function) {{text|returns the number of scroll wheels available on a specified number device listed by [[_DEVICE$]].}}
* [[_LASTWHEEL]] (function) {{Text|returns the number of scroll wheels available on a specified number device listed by [[_DEVICE$]].}}
* [[_MOUSEMOVEMENTX]] (function) {{text|returns the relative horizontal position of the mouse cursor compared to the previous position.}}
* [[_MOUSEMOVEMENTX]] (function) {{Text|returns the relative horizontal position of the mouse cursor compared to the previous position.}}
* [[_MOUSEMOVEMENTY]] (function) {{text|returns the relative vertical position of the mouse cursor compared to the previous position.}}
* [[_MOUSEMOVEMENTY]] (function) {{Text|returns the relative vertical position of the mouse cursor compared to the previous position.}}
* [[_WHEEL]] (function) {{text|returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}}
* [[_WHEEL]] (function) {{Text|returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}}
* [[ON STRIG(n)]] (event statement) {{text|directs program flow upon a button press event of a game controller device.}}
* [[ON STRIG(n)]] (event statement) {{Text|directs program flow upon a button press event of a game controller device.}}
* [[STICK]] (function) {{text|returns the directional axis coordinate values from 1 to 254 of game port (&H201) or USB controller devices.}}
* [[STICK]] (function) {{Text|returns the directional axis coordinate values from 1 to 254 of game port (&H201) or USB controller devices.}}
* [[STRIG]] (function) {{text|returns the True or False button press status of game port (&H201) or USB controller devices.}}
* [[STRIG]] (function) {{Text|returns the True or False button press status of game port (&H201) or USB controller devices.}}
* [[STRIG(n)]] (statement) {{text|enables, suspends or disables event trapping of STRIG button return values.}}
* [[STRIG(n)]] (statement) {{Text|enables, suspends or disables event trapping of STRIG button return values.}}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Graphic Commands ==
== Graphic Commands ==


* [[_COPYIMAGE]] (function) {{text|can copy a software surface to a hardware accelerated surface handle using mode 33.}}
* [[_COPYIMAGE]] (function) {{Text|can copy a software surface to a hardware accelerated surface handle using mode 33.}}
* [[_DISPLAY]] (statement) {{text|renders surfaces visible in the [[_DISPLAYORDER]] previously set in the QB64 program.}}
* [[_DISPLAY]] (statement) {{Text|renders surfaces visible in the [[_DISPLAYORDER]] previously set in the QB64 program.}}
* [[_DISPLAYORDER]] {{text|sets the rendering order of _SOFTWARE, _HARDWARE and _GLRENDER with [[_DISPLAY]].}}
* [[_DISPLAYORDER]] {{Text|sets the rendering order of _SOFTWARE, _HARDWARE and _GLRENDER with [[_DISPLAY]].}}
* [[_LOADIMAGE]] (function) {{text|can load images as hardware accelerated using mode 33.}}
* [[_LOADIMAGE]] (function) {{Text|can load images as hardware accelerated using mode 33.}}
* [[_MOUSESHOW]] (statement) {{text|a special string parameter after command in GL allows some special cursor shapes.}}
* [[_PUTIMAGE]] (statement) {{Text|can place GL surfaces and allows the _SMOOTH action to blend stretched surfaces.}}
* [[_PUTIMAGE]] (statement) {{text|can place GL surfaces and allows the _SMOOTH action to blend stretched surfaces.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Graphics and Imaging: ==
== Graphics and Imaging: ==


* [[_AUTODISPLAY]] (statement) {{text|enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].}}
* [[_AUTODISPLAY]] (statement) {{Text|enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].}}
* [[_CLIP]] ([[PUT (graphics statement)|PUT]] action) {{text|allows placement of an image partially off of the screen.}}
* [[_CLIP]] ([[PUT (graphics statement)|PUT]] action) {{Text|allows placement of an image partially off of the screen.}}
* [[_COPYIMAGE]] (function) {{text|function duplicates an image handle from a designated handle.}}
* [[_COPYIMAGE]] (function) {{Text|function duplicates an image handle from a designated handle.}}
* [[_COPYPALETTE]] (statement) {{text|copies the color palette intensities from one image to another image or screen page.}}
* [[_COPYPALETTE]] (statement) {{Text|copies the color palette intensities from one image to another image or screen page.}}
* [[_DEST]] (statement) {{text|sets the current write image or page. All graphics will go to this image.}}
* [[_DESKTOPHEIGHT]] (function) {{Text|returns the height of the desktop (not program window).}}
* [[_DEST (function)]] {{text|returns the current write destination image or page.}}
* [[_DESKTOPWIDTH]] (function) {{Text|returns the width of the desktop (not program window).}}
* [[_DISPLAY]] (statement) {{text|turns off automatic display while only displaying the screen changes when called.}}
* [[_DEST]] (statement) {{Text|sets the current write image or page. All graphics will go to this image.}}
* [[_DISPLAY (function)]] {{text|returns the handle of the current image that is displayed on the screen.}}
* [[_DEST (function)]] {{Text|returns the current write destination image or page.}}
* [[_FULLSCREEN (function)]] {{text|returns the present full screen mode setting of the screen window.}}
* [[_DISPLAY]] (statement) {{Text|turns off automatic display while only displaying the screen changes when called.}}
* [[_FULLSCREEN]] (statement) {{text|sets the full screen mode of the screen window. Alt + Enter can do it manually.}}
* [[_DISPLAY (function)]] {{Text|returns the handle of the current image that is displayed on the screen.}}
* [[_FREEIMAGE]] (statement) {{text|releases an image handle value from memory when no longer needed.}}
* [[_FULLSCREEN (function)]] {{Text|returns the present full screen mode setting of the screen window.}}
* [[_HEIGHT]] (function) {{text|returns the height of an image handle or current write page.}}
* [[_FULLSCREEN]] (statement) {{Text|sets the full screen mode of the screen window. Alt + Enter can do it manually.}}
* [[_ICON]] (function) {{text|places an image in the title bar using a [[_LOADIMAGE]] handle.}}
* [[_FREEIMAGE]] (statement) {{Text|releases an image handle value from memory when no longer needed.}}
* [[_LOADIMAGE]] (function) {{text|loads a graphic file image into memory and returns an image handle.}}
* [[_HEIGHT]] (function) {{Text|returns the height of an image handle or current write page.}}
* [[_MAPTRIANGLE]] (statement) {{text|maps a triangular portion of an image to a destination image or screen page.}}
* [[_ICON]] (function) {{Text|places an image in the title bar using a [[_LOADIMAGE]] handle.}}
* [[_NEWIMAGE]] (function) {{text|prepares a window image or page surface and returns the handle value.}}
* [[_LOADIMAGE]] (function) {{Text|loads a graphic file image into memory and returns an image handle.}}
* [[_PIXELSIZE]] (function) {{text|returns the color depth (Bits Per Pixel) of an image.}}
* [[_MAPTRIANGLE]] (statement) {{Text|maps a triangular portion of an image to a destination image or screen page.}}
* [[_PRINTSTRING]] (statement) {{text|prints text or custom font strings using graphic column and row coordinate positions.}}
* [[_NEWIMAGE]] (function) {{Text|prepares a window image or page surface and returns the handle value.}}
* [[_PUTIMAGE]] (statement) {{text|maps a rectangular area of a source image to an area of a destination image in one operation}}
* [[_PIXELSIZE]] (function) {{Text|returns the color depth (Bits Per Pixel) of an image.}}
* [[_SCREENIMAGE]] (function) {{text|creates an image of the current desktop and returns an image handle.}}
* [[_PRINTSTRING]] (statement) {{Text|prints text or custom font strings using graphic column and row coordinate positions.}}
* [[_SOURCE]] (statement) {{text|establishes the image SOURCE using a designated image handle}}
* [[_PUTIMAGE]] (statement) {{Text|maps a rectangular area of a source image to an area of a destination image in one operation}}
* [[_SOURCE (function)]] {{text|returns the present image _SOURCE handle value.}}
* [[_SAVEIMAGE]] (statement) {{Text|Saves the screen or an image handle to an image file.}}
* [[_WIDTH (function)]] {{text|returns the width of an image handle or current write page.}}
* [[_SCREENIMAGE]] (function) {{Text|creates an image of the current desktop and returns an image handle.}}
* [[_SMOOTH (function)]] {{Text|checks whether the current [[_FULLSCREEN]] mode has antialiasing enabled or not.}}
* [[_SOURCE]] (statement) {{Text|establishes the image SOURCE using a designated image handle}}
* [[_SOURCE (function)]] {{Text|returns the present image _SOURCE handle value.}}
* [[_UCHARPOS]] (function) {{Text|calculates the starting pixel positions of every character of a (unicode) text string.}}
* [[_UPRINTSTRING]] (statement) {{Text|locates and prints a (unicode) text [[STRING|string]] using graphic coordinates.}}
* [[_WIDTH (function)]] {{Text|returns the width of an image handle or current write page.}}




* [[CIRCLE]] (statement) {{text|is used in graphics SCREEN modes to create circles, arcs or ellipses.}}
* [[CIRCLE]] (statement) {{Text|is used in graphics SCREEN modes to create circles, arcs or ellipses.}}
* [[CLS]] (statement) {{text|clears a screen page or the program [[SCREEN]]. QB64 can clear with a color.}}
* [[CLS]] (statement) {{Text|clears a screen page or the program [[SCREEN]]. QB64 can clear with a color.}}
* [[COLOR]] (statement) {{text|sets the current text color attribute or [[_RGB]] value to be used or background colors in some screen modes.}}
* [[COLOR]] (statement) {{Text|sets the current text color attribute or [[_RGB]] value to be used or background colors in some screen modes.}}
* [[DRAW]] (statement) {{text|uses a special type of [[STRING|string]] expression to draw lines on the screen.}}
* [[DRAW]] (statement) {{Text|uses a special type of [[STRING|string]] expression to draw lines on the screen.}}
* [[GET (graphics statement)]] {{text|used to store a box area image of the screen into an [[INTEGER]] array.}}
* [[GET (graphics statement)]] {{Text|used to store a box area image of the screen into an [[INTEGER]] array.}}
* [[LINE]] (statement) {{text|used in graphic [[SCREEN]] modes to create lines or boxes.}}
* [[LINE]] (statement) {{Text|used in graphic [[SCREEN]] modes to create lines or boxes.}}
* [[PAINT]] (statement) {{text|used to color enclosed graphic objects with a designated fill color and border color.}}
* [[PAINT]] (statement) {{Text|used to color enclosed graphic objects with a designated fill color and border color.}}
* [[PALETTE]] (statement) {{text|can swap color settings, set colors to default or set the Red, Green, Blue color palette.}}
* [[PALETTE]] (statement) {{Text|can swap color settings, set colors to default or set the Red, Green, Blue color palette.}}
* [[PALETTE USING]] (statement) {{text|sets all RGB screen color intensities using values from an array.}}
* [[PALETTE USING]] (statement) {{Text|sets all RGB screen color intensities using values from an array.}}
* [[PCOPY]] (statement) {{text|copies one source screen page to a destination page in memory.}}
* [[PCOPY]] (statement) {{Text|copies one source screen page to a destination page in memory.}}
* [[PMAP]] (function) {{text|returns the physical or [[WINDOW]] view coordinates.}}
* [[PMAP]] (function) {{Text|returns the physical or [[WINDOW]] view coordinates.}}
* [[POINT]] (function) {{text|returns the pixel [[COLOR]] attribute or [[_RGB]] value at a specified graphics coordinate.}}
* [[POINT]] (function) {{Text|returns the pixel [[COLOR]] attribute or [[_RGB]] value at a specified graphics coordinate.}}
* [[PRESET]] (statement) {{text|sets a pixel coordinate to the background color or a designated color.}}
* [[PRESET]] (statement) {{Text|sets a pixel coordinate to the background color or a designated color.}}
* [[PSET]] (statement) {{text|sets a pixel coordinate to the default color or designated color attribute.}}
* [[PSET]] (statement) {{Text|sets a pixel coordinate to the default color or designated color attribute.}}
* [[PUT (graphics statement)]] {{text|statement is used to place [[GET (graphics statement)|GET]] saved or [[BSAVE]]d images stored in an array.}}
* [[PUT (graphics statement)]] {{Text|statement is used to place [[GET (graphics statement)|GET]] saved or [[BSAVE]]d images stored in an array.}}
* [[SCREEN]] {{text|sets the screen mode of a program. No statement defaults the program to SCREEN 0 text only mode.}}
* [[SCREEN]] {{Text|sets the screen mode of a program. No statement defaults the program to SCREEN 0 text only mode.}}
* [[STEP]] (relational statement) {{text|is used to step through FOR loop values or use relative graphical coordinates.}}
* [[STEP]] (relational statement) {{Text|is used to step through FOR loop values or use relative graphical coordinates.}}
* [[VIEW]] (graphics statement) {{text|creates a graphics view port area by defining the coordinate limits to be viewed.}}
* [[VIEW]] (graphics statement) {{Text|creates a graphics view port area by defining the coordinate limits to be viewed.}}
* [[WINDOW]] (statement) {{text|defines the coordinate dimensions of the current graphics viewport.}}
* [[WINDOW]] (statement) {{Text|defines the coordinate dimensions of the current graphics viewport.}}




<center>'''See also: [[Bitmaps]], [[Icons and Cursors]], [[SAVEIMAGE]], [[GIF Images]]'''</center>
<center>See also: [[Bitmaps]], [[Icons and Cursors]], [[SaveImage SUB]], [[GIF Images]]</center>


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Keyboard Input ==
== Keyboard Input ==
* [[_CONTROLCHR]] (statement) {{text|[[OFF]] allows the control characters to be used as text characters. [[ON]](default) can use them as commands.}}
* [[_CONTROLCHR]] (statement) {{Text|[[OFF]] allows the control characters to be used as text characters. [[ON]](default) can use them as commands.}}
* [[_CONTROLCHR (function)]]  {{text| returns the current state of _CONTROLCHR as 1 when OFF and 0 when ON.}}
* [[_CONTROLCHR (function)]]  {{Text| returns the current state of _CONTROLCHR as 1 when OFF and 0 when ON.}}
* [[_EXIT (function)]] {{text|prevents a program user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
* [[_EXIT (function)]] {{Text|prevents a program user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
* [[_KEYDOWN]] (function) {{text|returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.}}
* [[_INPUTBOX$]] (function) {{Text|Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box.}}
* [[_KEYHIT]] (function) {{text|returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.}}
* [[_KEYDOWN]] (function) {{Text|returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.}}
* [[_SCREENPRINT]] (statement) {{text|simulates typing text into another OS program using the keyboard.}}
* [[_KEYHIT]] (function) {{Text|returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.}}
* [[_SCREENPRINT]] (statement) {{Text|simulates typing text into another OS program using the keyboard.}}




* [[INKEY$]] (function) {{text|returns the [[ASCII]] [[STRING|string]] character of a keypress.}}
* [[INKEY$]] (function) {{Text|returns the [[ASCII]] [[STRING|string]] character of a keypress.}}
* [[INPUT]] (statement) {{text|requests a [[STRING]] or numerical keyboard entry from a program user.}}
* [[INPUT]] (statement) {{Text|requests a [[STRING]] or numerical keyboard entry from a program user.}}
* [[INPUT$]] (function) {{text|used to get a set number of keypress characters or bytes from a file.}}
* [[INPUT$]] (function) {{Text|used to get a set number of keypress characters or bytes from a file.}}
* [[INP]] (function) {{text|returns a scan code value from keyboard register &H60(96) to determine key presses.}}
* [[INP]] (function) {{Text|returns a scan code value from keyboard register &H60(96) to determine key presses.}}
* [[KEY n]] (event statement) {{text|is used to assign a "softkey" string to a key and/or display them.}}
* [[KEY n]] (event statement) {{Text|is used to assign a "softkey" string to a key and/or display them.}}
* [[KEY(n)]] (event statement) {{text|assigns, enables, disables or suspends event trapping of a keypress.}}
* [[KEY(n)]] (event statement) {{Text|assigns, enables, disables or suspends event trapping of a keypress.}}
* [[KEY LIST]] (statement) {{text|lists the 12 Function key soft key string assignments going down left side of screen.}}
* [[KEY LIST]] (statement) {{Text|lists the 12 Function key soft key string assignments going down left side of screen.}}
* [[LINE INPUT]] (statement) {{text|requests a [[STRING]] keyboard entry from a program user.}}
* [[LINE INPUT]] (statement) {{Text|requests a [[STRING]] keyboard entry from a program user.}}
* [[ON KEY(n)]] (event statement) {{text|defines a line number or label to go to when a specified key is pressed.}}
* [[ON KEY(n)]] (event statement) {{Text|defines a line number or label to go to when a specified key is pressed.}}
* [[SLEEP]] (statement) {{text|pauses the program for a specified number of seconds or a until a key press.}}
* [[SLEEP]] (statement) {{Text|pauses the program for a specified number of seconds or a until a key press.}}




<center>See also: [[Keyboard scancodes]], [[ASCII|ASCII Codes]] references or  [[Windows_Libraries#Hot_Keys_.28maximize.29|Hot Keys for Windows]].</center>
<center>See also: [[Keyboard scancodes]], [[ASCII|ASCII Codes]] references or  [[Windows Libraries#Hot_Keys_(maximize)|Hot Keys for Windows]].</center>




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== [[Libraries]] ==
== [[Libraries]] ==


* [[_OFFSET (function)]] {{text|returns the memory offset of a variable when used with [[DECLARE DYNAMIC LIBRARY]] only.}}
* [[_OFFSET (function)]] {{Text|returns the memory offset of a variable when used with [[DECLARE LIBRARY]] only.}}
* [[_OFFSET]](variable type) {{text|can be used store the value of an offset in memory when using [[DECLARE DYNAMIC LIBRARY]] only.}}
* [[_OFFSET]](variable type) {{Text|can be used store the value of an offset in memory when using [[DECLARE LIBRARY]] only.}}




* [[ALIAS]] (statement) {{text|tells the program that you will use a different name than the name used in the Library file.}}
* [[ALIAS]] (statement) {{Text|tells the program that you will use a different name than the name used in the Library file.}}
* [[BYVAL]] (statement) {{text|used to pass a parameter's value with sub-procedures from a Library.}}
* [[BYVAL]] (statement) {{Text|used to pass a parameter's value with sub-procedures from a Library.}}
* [[DECLARE LIBRARY]] {{text|allows the use of OS specific, SDL or C++ external library [[SUB]] and [[FUNCTION]] procedures}}
* [[DECLARE LIBRARY]] {{Text|allows the use of OS specific, SDL or C++ external library [[SUB]] and [[FUNCTION]] procedures}}
* [[DECLARE DYNAMIC LIBRARY]] {{text|declares DYNAMIC, CUSTOMTYPE or STATIC  library(DLL) [[SUB]]s or [[FUNCTION]]s.}}
* [[DECLARE LIBRARY|END DECLARE]] {{Text|required at the END of the block of Library declarations in QB64.}}
* [[DECLARE LIBRARY| END DECLARE]] {{text|required at the END of the block of Library declarations in QB64.}}




<center>'''QB64 also supports [[$INCLUDE]] text code file Libraries. QB64 does not support QLB Libraries or OBJ files.'''</center>
<center>'''QB64 also supports [[$INCLUDE]] text code file Libraries. QB64 does not support QLB Libraries or OBJ files.'''</center>
* [[$INCLUDEONCE]] (metacommand) {{Text|prevents that include file contents is injected multiple times into a program.}}




Line 570: Line 479:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Logical Bitwise Operations ==
== Logical Bitwise Operations ==


* [[AND]] (operator) {{text|the bit is set when both bits are set.}}
* [[AND]] (operator) {{Text|the bit is set when both bits are set.}}
* [[EQV]] (operator) {{text|the bit is set when both are set or both are not set.}}
* [[EQV]] (operator) {{Text|the bit is set when both are set or both are not set.}}
* [[IMP]] (operator) {{text|the bit is set when both are set or both are unset or the second condition bit is set.}}
* [[IMP]] (operator) {{Text|the bit is set when both are set or both are unset or the second condition bit is set.}}
* [[OR]] (operator) {{text|the bit is set when either bit is set.}}
* [[OR]] (operator) {{Text|the bit is set when either bit is set.}}
* [[NOT]] (operator) {{text|the bit is set when a bit is not set and not set when a bit is set.}}
* [[NOT]] (operator) {{Text|the bit is set when a bit is not set and not set when a bit is set.}}
* [[XOR]] (operator) {{text|the bit is set when just one of the bits are set.}}
* [[XOR]] (operator) {{Text|the bit is set when just one of the bits are set.}}




{{LogicalTruthTable}}
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
 


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Mathematical Functions and Operations ==
== Mathematical Functions and Operations ==


* [[_ROUND]] (function) {{text|rounds to the closest EVEN [[INTEGER]], [[LONG]] or [[_INTEGER64]] numerical value.}}
* [[_MAX]] (function) {{Text|Returns the greater of two given numeric values.}}
* [[_MIN]] (function) {{Text|Returns the lesser of two given numeric values.}}
* [[_ROUND]] (function) {{Text|rounds to the closest EVEN [[INTEGER]], [[LONG]] or [[_INTEGER64]] numerical value.}}




Line 600: Line 510:




* [[ABS]] (function) {{text|returns the the positive value of a variable or literal numerical value.}}
* [[ABS]] (function) {{Text|returns the the positive value of a variable or literal numerical value.}}
* [[ATN]] (function) {{text|or arctangent returns the angle in radians of a numerical [[TAN|tangent]] value.}}
* [[ATN]] (function) {{Text|or arctangent returns the angle in radians of a numerical [[TAN|tangent]] value.}}
* [[CDBL]] (function) {{text|closest double rounding function}}
* [[CDBL]] (function) {{Text|closest double rounding function}}
* [[CINT]] (function) {{text|closest integer rounding function}}
* [[CINT]] (function) {{Text|closest integer rounding function}}
* [[CLNG]] (function) {{text|closest long integer rounding function}}
* [[CLNG]] (function) {{Text|closest long integer rounding function}}
* [[COS]] (function) {{text|cosine of a radian angle}}
* [[COS]] (function) {{Text|cosine of a radian angle}}
* [[CSNG]] (function) {{text|closest single rounding function}}
* [[CSNG]] (function) {{Text|closest single rounding function}}
* [[EXP]] (function) {{text|returns the value of e to the power of the parameter used.}}
* [[EXP]] (function) {{Text|returns the value of e to the power of the parameter used.}}
* [[FIX]] (function) {{text|rounds positive or negative values to integer values closer to 0}}
* [[FIX]] (function) {{Text|rounds positive or negative values to integer values closer to 0}}
* [[INT]] (function) {{text|rounds to lower integer value}}
* [[INT]] (function) {{Text|rounds to lower integer value}}
* [[LOG]] (function) {{text|natural logarithm of a specified numerical value.}}
* [[LOG]] (function) {{Text|natural logarithm of a specified numerical value.}}
* [[SIN]] (function) {{text|sine of a radian angle.}}
* [[SIN]] (function) {{Text|sine of a radian angle.}}
* [[SQR]] (function) {{text|square root of a positive number.}}
* [[SQR]] (function) {{Text|square root of a positive number.}}
* [[TAN]] (function) {{text|returns the ratio of [[SIN]]e to [[COS]]ine or tangent value of an angle measured in radians.}}
* [[TAN]] (function) {{Text|returns the ratio of [[SIN]]e to [[COS]]ine or tangent value of an angle measured in radians.}}




<center>See also: [[Mathematical Operations]] and [[#Logical Bitwise Operations:|Logical Operations:]] </center>
<center>See also: [[Mathematical Operations]] and [[#Logical_Bitwise_Operations|Logical Operations]]</center>


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Memory Handling and Clipboard ==
== Memory Handling and Clipboard ==


* [[_CLIPBOARD$]] (function) {{text|returns the current [[STRING]] contents of the system Clipboard.}}
* [[_CLIPBOARD$ (function)]] {{Text|returns the current [[STRING]] contents of the system Clipboard.}}
* [[_CLIPBOARD$ (statement)]] {{text|sets and overwrites the [[STRING]] contents of the current system Clipboard.}}
* [[_CLIPBOARD$]] (statement) {{Text|sets and overwrites the [[STRING]] contents of the current system Clipboard.}}
* [[_MEM (function)]] {{text|returns _MEM block referring to the largest continuous memory region beginning at a designated variable's offset.}}
* [[_MEM (function)]] {{Text|returns _MEM block referring to the largest continuous memory region beginning at a designated variable's offset.}}
* [[_MEM]] (variable type) {{text|contains read only dot elements for the OFFSET, SIZE, TYPE and ELEMENTSIZE of a block of memory.}}
* [[_MEM]] (variable type) {{Text|contains read only dot elements for the OFFSET, SIZE, TYPE and ELEMENTSIZE of a block of memory.}}
* [[_MEMCOPY]] (statement) {{text|copies a value from a designated OFFSET and SIZE [[TO]] a block of memory at a designated OFFSET.}}
* [[_MEMCOPY]] (statement) {{Text|copies a value from a designated OFFSET and SIZE [[TO]] a block of memory at a designated OFFSET.}}
* [[_MEMELEMENT]] (function) {{text|returns a [[_MEM]] block referring to a variable's memory (but not past it).}}
* [[_MEMELEMENT]] (function) {{Text|returns a [[_MEM]] block referring to a variable's memory (but not past it).}}
* [[_MEMEXISTS]] (function) {{text|verifies that a memory block exists for a memory variable name or returns zero.}}
* [[_MEMEXISTS]] (function) {{Text|verifies that a memory block exists for a memory variable name or returns zero.}}
* [[_MEMFILL]] (statement) {{text|fills a designated memory block OFFSET with a certain SIZE and TYPE of value.}}
* [[_MEMFILL]] (statement) {{Text|fills a designated memory block OFFSET with a certain SIZE and TYPE of value.}}
* [[_MEMFREE]] (statement) {{text|frees a designated memory block in a program. Only free memory once!}}
* [[_MEMFREE]] (statement) {{Text|frees a designated memory block in a program. Only free memory once!}}
* [[_MEMGET]] (statement) {{text|reads a designated value from a designated memory OFFSET}}
* [[_MEMGET]] (statement) {{Text|reads a designated value from a designated memory OFFSET}}
* [[_MEMGET (function)]] {{text|returns a value from a designated memory block and OFFSET using a designated variable [[TYPE]].}}
* [[_MEMGET (function)]] {{Text|returns a value from a designated memory block and OFFSET using a designated variable [[TYPE]].}}
* [[_MEMIMAGE]] (function) {{text|returns a [[_MEM]] block referring to a designated image handle's memory}}
* [[_MEMIMAGE]] (function) {{Text|returns a [[_MEM]] block referring to a designated image handle's memory}}
* [[_MEMNEW]] (function) {{text|allocates new memory with a designated SIZE and returns a [[_MEM]] block referring to it.}}
* [[_MEMNEW]] (function) {{Text|allocates new memory with a designated SIZE and returns a [[_MEM]] block referring to it.}}
* [[_MEMPUT]] (statement) {{text|places a designated value into a designated memory [[_OFFSET]]}}
* [[_MEMPUT]] (statement) {{Text|places a designated value into a designated memory [[_OFFSET]]}}
* [[_MEMSOUND]] (function) {{text|returns a [[_MEM]] block referring to a designated sound handle's memory}}
* [[_MEMSOUND]] (function) {{Text|returns a [[_MEM]] block referring to a designated sound handle's memory}}
* [[_OFFSET (function)]] {{text|returns the memory offset of a variable when used with [[DECLARE LIBRARY]] or [[_MEM]] only.}}
* [[_OFFSET (function)]] {{Text|returns the memory offset of a variable when used with [[DECLARE LIBRARY]] or [[_MEM]] only.}}
* [[_OFFSET]](%& numerical type) {{text|can be used store the value of an offset in memory when using [[DECLARE LIBRARY]] or [[_MEM]] only.}}
* [[_OFFSET]](%& numerical type) {{Text|can be used store the value of an offset in memory when using [[DECLARE LIBRARY]] or [[_MEM]] only.}}




<center>'''Functions and statements using QB64's emulated 16 bit memory'''</center>
<center>'''Functions and statements using QB64's emulated 16 bit memory'''</center>
* [[DEF SEG]] (statement) {{text|defines the segment address in memory.}}
* [[DEF SEG]] (statement) {{Text|defines the segment address in memory.}}
* [[PEEK]] (function) {{text|returns the value that is contained at a certain memory address offset.}}
* [[PEEK]] (function) {{Text|returns the value that is contained at a certain memory address offset.}}
* [[POKE]] (statement) {{text|sets the value of a specified memory address offset.}}
* [[POKE]] (statement) {{Text|sets the value of a specified memory address offset.}}
* [[SADD]] (function) {{text|returns the address of a STRING variable as an offset from the current data segment.}}
* [[SADD]] (function) {{Text|returns the address of a STRING variable as an offset from the current data segment.}}
* [[VARPTR]] (function) {{text|returns an [[INTEGER]] value that is the offset pointer of the memory address within it's [[segment]].}}
* [[VARPTR]] (function) {{Text|returns an [[INTEGER]] value that is the offset pointer of the memory address within it's [[segment]].}}
* [[VARPTR$]] (function) {{text|returns a STRING representation of a variable's memory address value}}
* [[VARPTR$]] (function) {{Text|returns a STRING representation of a variable's memory address value}}
* [[VARSEG]] (function) {{text|returns an [[INTEGER]] value that is the [[segment]] part of a variable or array memory address.}}
* [[VARSEG]] (function) {{Text|returns an [[INTEGER]] value that is the [[segment]] part of a variable or array memory address.}}


<center>See also: [[Screen Memory]] or [[Using _OFFSET]]</center>
<center>See also: [[Screen Memory]] or [[Using _OFFSET]]</center>
Line 654: Line 565:
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Metacommands ==
:Metacommands are commands that affect a program globally after they are in used. Error checking can be turned [[OFF]] or [[ON]].
<center>'''QB64 [[Metacommand]]s do NOT allow commenting or [[REM]]!'''</center>
* [[$CHECKING]]:OFF/ON {{text|(QB64 only) turns event and error checking ON and OFF. ON (default) can only be used after it is OFF.}}
* [[$CONSOLE]] {{text|creates a console window throughout the program.}}
* [[$SCREENHIDE]] {{text|hides the program window throughout the program until [[$SCREENSHOW]] is used.}}
* [[$SCREENSHOW]] {{text|displays the main program window throughout the program only after [[$SCREENHIDE]] or [[_SCREENHIDE]] has been used.}}
<center>'''QBasic [[Metacommand]]s do not require commenting or [[REM]] in QB64!'''</center>
* '[[$DYNAMIC]] {{text|defines that all arrays are dynamic or changeable in size using [[DIM]] or [[REDIM]].}}
* '[[$INCLUDE]]: 'filename$' {{text|includes a text library file with procedures to be used in a program. Comment both sides of file name also.}}
* '[[$STATIC]] {{text|defines that all arrays are static or unchangeable in size using [[DIM]].}} 
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Mouse Input ==
== Mouse Input ==
* [[_AXIS]] (function) {{text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distances from device center 0.}}
* [[_AXIS]] (function) {{Text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distances from device center 0.}}
* [[_BUTTON]] (function) {{text|returns -1 when a device button is pressed and 0 when button is released. 2 is the mouse center or scroll button}}
* [[_BUTTON]] (function) {{Text|returns -1 when a device button is pressed and 0 when button is released. 2 is the mouse center or scroll button}}
* [[_BUTTONCHANGE]] (function) {{text|returns -1 when a device button has been pressed and 1 when released. Zero indicates no change.}}
* [[_BUTTONCHANGE]] (function) {{Text|returns -1 when a device button has been pressed and 1 when released. Zero indicates no change.}}
* [[_DEVICE$]] (function) {{text|returns a [[STRING]] expression listing device names and input types of system input devices.}}
* [[_DEVICE$]] (function) {{Text|returns a [[STRING]] expression listing device names and input types of system input devices.}}
* [[_DEVICEINPUT]] (function) {{text|returns the [[_DEVICES]] number of an [[_AXIS]], [[_BUTTON]] or [[_WHEEL]] event. Mouse is normally _DEVICEINPUT(2).}}
* [[_DEVICEINPUT]] (function) {{Text|returns the [[_DEVICES]] number of an [[_AXIS]], [[_BUTTON]] or [[_WHEEL]] event. Mouse is normally _DEVICEINPUT(2).}}
* [[_DEVICES]] (function) {{text|returns the number of input devices found on a computer system. The mouse is normally device 2.}}
* [[_DEVICES]] (function) {{Text|returns the number of input devices found on a computer system. The mouse is normally device 2.}}
* [[_EXIT (function)]] {{text|prevents a program user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
* [[_EXIT (function)]] {{Text|prevents a program user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
* [[_LASTAXIS]] (function) {{text|returns the number of axis available on a specified number device listed by [[_DEVICE$]].}}
* [[_LASTAXIS]] (function) {{Text|returns the number of axis available on a specified number device listed by [[_DEVICE$]].}}
*[[_LASTBUTTON]] (function) {{text|returns the number of buttons available on a specified number device listed by [[DEVICE$]].}}  
*[[_LASTBUTTON]] (function) {{Text|returns the number of buttons available on a specified number device listed by [[DEVICE$]].}}
* [[_LASTWHEEL]] (function) {{text|returns the number of scroll wheels available on a specified number device listed by [[_DEVICE$]].}}
* [[_LASTWHEEL]] (function) {{Text|returns the number of scroll wheels available on a specified number device listed by [[_DEVICE$]].}}
* [[_MOUSEBUTTON]] (function) {{text|returns whether a specified mouse button number has been clicked. 3 is the mouse center or scroll button}}
* [[_MOUSEBUTTON]] (function) {{Text|returns whether a specified mouse button number has been clicked. 3 is the mouse center or scroll button}}
* [[_MOUSEHIDE]] (statement) {{text|hides the OS mouse pointer from view.}}
* [[_MOUSEHIDDEN]] (function) {{Text|returns the current state of the mouse pointer.}}
* [[_MOUSEINPUT]] (function) {{text|must be used to monitor and read all changes in the mouse status.}}
* [[_MOUSEHIDE]] (statement) {{Text|hides the OS mouse pointer from view.}}
* [[_MOUSEMOVE]] (statement) {{text|moves the mouse cursor pointer to a designated coordinate.}}
* [[_MOUSEINPUT]] (function) {{Text|must be used to monitor and read all changes in the mouse status.}}
* [[_MOUSEMOVEMENTX]] (function) {{text|returns the relative horizontal position of the mouse cursor.}}
* [[_MOUSEMOVE]] (statement) {{Text|moves the mouse cursor pointer to a designated coordinate.}}
* [[_MOUSEMOVEMENTY]] (function) {{text|returns the relative vertical position of the mouse cursor.}}
* [[_MOUSEMOVEMENTX]] (function) {{Text|returns the relative horizontal position of the mouse cursor.}}
* [[_MOUSESHOW]] (statement) {{text|displays(default) the mouse cursor after it has been hidden.}}
* [[_MOUSEMOVEMENTY]] (function) {{Text|returns the relative vertical position of the mouse cursor.}}
* [[_MOUSEWHEEL]] (function) {{text|returns a positive or negative count the mouse scroll wheel clicks since the last read.}}
* [[_MOUSESHOW]] (statement) {{Text|displays the OS mouse cursor after it has been hidden.}}
* [[_MOUSEX]] (function) {{text|indicates the current horizontal position of the mouse pointer.}}
* [[_MOUSEWHEEL]] (function) {{Text|returns a positive or negative count the mouse scroll wheel clicks since the last read.}}
* [[_MOUSEY]] (function) {{text|indicates the current vertical position of the mouse pointer.}}
* [[_MOUSEX]] (function) {{Text|indicates the current horizontal position of the mouse pointer.}}
* [[_SCREENCLICK]]  {{text|simulates clicking the mouse at a position on the screen to get focus.}}
* [[_MOUSEY]] (function) {{Text|indicates the current vertical position of the mouse pointer.}}
* [[_WHEEL]] (function) {{text|returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}}
* [[_SCREENCLICK]]  {{Text|simulates clicking the mouse at a position on the screen to get focus.}}
* [[_WHEEL]] (function) {{Text|returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}}




* [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented.}}
* [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{Text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented.}}
* [[INTERRUPT]] (statement) {{text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented. }}
* [[INTERRUPT]] (statement) {{Text|used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented. }}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Numerical Manipulation and Conversion ==
== Numerical Manipulation and Conversion ==


* [[_CV]] (function)  {{text|used to convert [[_MK$]] [[ASCII]] [[STRING|string]] values to specified numerical value types.}}
* [[_BIN$]] (function) {{Text|converts the [[INTEGER]] part of any value to binary [[STRING]] number value.}}
* [[_MK$]] (function)  {{text|converts a specified numerical type into an [[ASCII]] [[STRING|string]]  value that must be converted back using [[_CV]].}}
* [[_CV]] (function)  {{Text|used to convert [[_MK$]] [[ASCII]] [[STRING|string]] values to specified numerical value types.}}
* [[_PRESERVE]] ([[REDIM]] action) {{text|preserves the current contents of an [[arrays|array]], when re-dimensioning it.}}
* [[_MK$]] (function)  {{Text|converts a specified numerical type into an [[ASCII]] [[STRING|string]]  value that must be converted back using [[_CV]].}}
* [[_UNSIGNED]] {numerical [[TYPE|type]]) {{text|defines a numerical value as being positive only using QB64.}}
* [[_PRESERVE]] ([[REDIM]] action) {{Text|preserves the current contents of an [[arrays|array]], when re-dimensioning it.}}
* [[_TOSTR$]] (function) {{Text|Returns the [[STRING]] representation of a numerical value. It's a successor of the legacy [[STR$]] function.}}
* [[_UNSIGNED]] {numerical [[TYPE|type]]) {{Text|defines a numerical value as being positive only using QB64.}}




* [[ABS]] (function) {{text|returns the the positive value of a variable or literal numerical value.}}
* [[ABS]] (function) {{Text|returns the the positive value of a variable or literal numerical value.}}
* [[ASC]] (function) {{text|returns the [[ASCII]] code number of a certain [[STRING]] text character or a keyboard press.}}
* [[ASC (function)]] {{Text|returns the [[ASCII]] code number of a certain [[STRING]] text character or a keyboard press.}}
* [[_BIN$]] (function) {{text|converts the [[INTEGER]] part of any value to binary [[STRING]] number value.}}
* [[CDBL]] (function) {{Text|converts a numerical value to the closest [[DOUBLE]]-precision value.}}
* [[CDBL]] (function) {{text|converts a numerical value to the closest [[DOUBLE]]-precision value.}}
* [[CHR$]] (function) {{Text|returns the character associated with a certain [[ASCII]] character code as a [[STRING]].}}
* [[CHR$]] (function) {{text|returns the character associated with a certain [[ASCII]] character code as a [[STRING]].}}
* [[CINT]] (function) {{Text|returns the closest [[INTEGER]] value of a number.}}
* [[CINT]] (function) {{text|returns the closest [[INTEGER]] value of a number.}}
* [[CLEAR]] (statement) {{Text|clears all variable values to 0 or null [[STRING|strings]] and closes all open files.}}
* [[CLEAR]] (statement) {{text|clears all variable values to 0 or null [[STRING|strings]] and closes all open files.}}
* [[CLNG]] (function) {{Text| rounds decimal point numbers up or down to the nearest [[LONG]] integer value.}}
* [[CLNG]] (function) {{text| rounds decimal point numbers up or down to the nearest [[LONG]] integer value.}}
* [[CSNG]] (function) {{Text|converts a numerical value to the closest [[SINGLE]]-precision number.}}
* [[CSNG]] (function) {{text|converts a numerical value to the closest [[SINGLE]]-precision number.}}
* [[CVD]] (function) {{Text|converts [[STRING]] values to [[DOUBLE]] numerical values.}}
* [[CVD]] (function) {{text|converts [[STRING]] values to [[DOUBLE]] numerical values.}}
* [[CVDMBF]] (function) {{Text|converts a 8-byte Microsoft Binary format [[STRING|string]] value to a [[DOUBLE]] precision number.}}
* [[CVDMBF]] (function) {{text|converts a 8-byte Microsoft Binary format [[STRING|string]] value to a [[DOUBLE]] precision number.}}
* [[CVI]] (function) {{Text|converts 2 byte STRING values to [[INTEGER]] numerical values.}}
* [[CVI]] (function) {{text|converts 2 byte STRING values to [[INTEGER]] numerical values.}}
* [[CVL]] (function) {{Text|converts 4 byte STRING values to [[LONG]] numerical values.}}
* [[CVL]] (function) {{text|converts 4 byte STRING values to [[LONG]] numerical values.}}
* [[CVS]] (function) {{Text|converts 4 byte STRING values to [[SINGLE]] numerical values.}}
* [[CVS]] (function) {{text|converts 4 byte STRING values to [[SINGLE]] numerical values.}}
* [[CVSMBF]] (function) {{Text|converts a 4-byte Microsoft Binary format [[STRING|string]] value to a [[SINGLE]]-precision number.}}
* [[CVSMBF]] (function) {{text|converts a 4-byte Microsoft Binary format [[STRING|string]] value to a [[SINGLE]]-precision number.}}
* [[DIM]] (statement) {{Text|used to declare a variable type or dimension a [[STATIC]] array.}}
* [[DIM]] (statement) {{text|used to declare a variable type or dimension a [[STATIC]] array.}}
* [[ERASE]] (array statement) {{Text|clears a [[STATIC]] array of all values and totally removes a [[$DYNAMIC]] array.}}
* [[ERASE]] (array statement) {{text|clears a [[STATIC]] array of all values and totally removes a [[$DYNAMIC]] array.}}
* [[HEX$]] (function) {{Text|converts the [[INTEGER]] part of any value to hexadecimal [[STRING]] number value.}}
* [[HEX$]] (function) {{text|converts the [[INTEGER]] part of any value to hexadecimal [[STRING]] number value.}}
* [[INT]] (function) {{Text|rounds a numeric value down to the next whole number or [[INTEGER]] value.}}
* [[INT]] (function) {{text|rounds a numeric value down to the next whole number or [[INTEGER]] value.}}
* [[LEN]] (function) {{Text|returns the byte size of strings or numerical variables.}}
* [[LEN]] (function) {{text|returns the byte size of strings or numerical variables.}}
* [[OCT$]] (function) {{Text|converts the [[INTEGER]] part of any value to octal [[STRING]] number value.}}
* [[OCT$]] (function) {{text|converts the [[INTEGER]] part of any value to octal [[STRING]] number value.}}
* [[RANDOMIZE]] (statement) {{Text|seeds the [[RND]] random number generation sequence.}}
* [[RANDOMIZE]] (statement) {{text|seeds the [[RND]] random number generation sequence.}}
* [[REDIM]] (statement) {{Text|re-dimensions the number of elements in a [[$DYNAMIC|dynamic]](resizeable) [[arrays|array]].}}
* [[REDIM]] (statement) {{text|re-dimensions the number of elements in a [[$DYNAMIC|dynamic]](resizeable) [[arrays|array]].}}
* [[RND]] (function) {{Text|returns a randomly generated number from 0 to .9999999}}
* [[RND]] (function) {{text|returns a randomly generated number from 0 to .9999999}}
* [[SGN]] (function) {{Text|returns the sign as -1 for negative, zero for 0 and 1 for positive numerical values.}}
* [[SGN]] (function) {{text|returns the sign as -1 for negative, zero for 0 and 1 for positive numerical values.}}
* [[STR$]] (function) {{Text|converts a numerical value to a [[STRING]] value.}}
* [[STR$]] (function) {{text|converts a numerical value to a [[STRING]] value.}}
* [[SWAP]] (statement) {{Text|trades the values of two numerical types or [[STRING|strings]].}}
* [[SWAP]] (statement) {{text|trades the values of two numerical types or [[STRING|strings]].}}
* [[VAL]] (function) {{Text|converts number [[STRING|strings]] into numerical values until it runs into a non-numeric character.}}
* [[VAL]] (function) {{text|converts number [[STRING|strings]] into numerical values until it runs into a non-numeric character.}}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Port Input and Output (COM and LPT) ==
== Port Input and Output (COM and LPT) ==


* [[COM(n)]] (statement) {{text|used in an OPEN COM statement to open "COM1" or "COM2".}}
* [[GET]] (file I/O statement) {{Text|reads port data data by byte or record positions.}}
 
* [[LOC]] (function) {{Text|finds the current file location or size of a [[OPEN COM|COM]] port receive buffer.}}
 
* [[GET]] (file I/O statement) {{text|reads port data data by byte or record positions.}}
* [[LOC]] (function) {{text|finds the current file location or size of a [[COM]] port receive buffer.}}




* [[ON COM(n)]] (event statement) {{text|branches to a line number or label when there is a value in the serial port specified.}}
* [[OPEN COM]] (statement) {{Text|opens a computer serial COMmunications port.}}
* [[OPEN COM]] (statement) {{text|opens a computer serial COMmunications port.}}
* [[OUT]] (statement) {{Text|sends values to register or port hardware addresses (emulated - limited access).}}
* [[OUT]] (statement) {{text|sends values to register or port hardware addresses (emulated - limited access).}}




* [[PRINT (file statement)]] {{text|writes text and numerical data to a port transmit buffer.}}
* [[PRINT (file statement)]] {{Text|writes text and numerical data to a port transmit buffer.}}
* [[PUT]] (file I/O statement) {{text|writes data into a [[RANDOM]] or [[BINARY]] port by byte or record position.}}
* [[PUT]] (file I/O statement) {{Text|writes data into a [[RANDOM]] or [[BINARY]] port by byte or record position.}}




Line 765: Line 659:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Print formatting ==
== Print formatting ==


* [[LPRINT USING]] (statement) {{text|prints template formatted [[STRING]] text to an LPT or USB  printer page.}}
* [[LPRINT USING]] (statement) {{Text|prints template formatted [[STRING]] text to an LPT or USB  printer page.}}
* [[PRINT USING]] (statement) {{text|prints template formatted [[STRING]] text to the screen.}}
* [[PRINT USING]] (statement) {{Text|prints template formatted [[STRING]] text to the screen.}}
* [[PRINT USING (file statement)]] {{text|prints template formatted [[STRING]] text to a text file.}}
* [[PRINT USING (file statement)]] {{Text|prints template formatted [[STRING]] text to a text file.}}




{{PrintUsingTable}}
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
 


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Printer Output (LPT and USB) ==
== Printer Output (LPT and USB) ==


* [[_PRINTIMAGE]] (statement) {{text|prints an image stretched to the size of the paper setting of an LPT or USB printer.}}
* [[_PRINTIMAGE]] (statement) {{Text|prints an image stretched to the size of the paper setting of an LPT or USB printer.}}




* [[LPOS]] (function) {{text|returns the current parallel(LPT) printer head position.}}
* [[LPOS]] (function) {{Text|returns the current parallel(LPT) printer head position.}}
* [[LPRINT]] (statement) {{text|prints text to an LPT or USB printer page.}}
* [[LPRINT]] (statement) {{Text|prints text to an LPT or USB printer page.}}
* [[LPRINT USING]] (statement) {{text|prints template formatted [[STRING]] text to an LPT or USB  printer page.}}
* [[LPRINT USING]] (statement) {{Text|prints template formatted [[STRING]] text to an LPT or USB  printer page.}}




Line 792: Line 685:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Program Flow and Loops ==
== Program Flow and Loops ==
* [[_CONTINUE]] (statement) {{text|skips the remaining lines in a control block (DO/LOOP, FOR/NEXT or WHILE/WEND)}}
* [[_CONTINUE]] (statement) {{Text|skips the remaining lines in a control block (DO/LOOP, FOR/NEXT or WHILE/WEND)}}
* [[_DEST]] (statement) {{text|sets the current write image or page. All graphics will go to this image.}}
* [[_DEST]] (statement) {{Text|sets the current write image or page. All graphics will go to this image.}}
* [[_DEST (function)]] {{text|returns the current write destination image or page.}}
* [[_DEST (function)]] {{Text|returns the current write destination image or page.}}
* [[_EXIT (function)]] {{text|prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
* [[_EXIT (function)]] {{Text|prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.}}
* [[_SOURCE]] (statement) {{text|establishes the image SOURCE using a designated image handle}}
* [[_SOURCE]] (statement) {{Text|establishes the image SOURCE using a designated image handle}}
* [[_SOURCE (function)]] {{text|returns the present image _SOURCE handle value.}}
* [[_SOURCE (function)]] {{Text|returns the present image _SOURCE handle value.}}
* [[_SHELLHIDE]] (function) {{text|returns the code sent by a program exit using [[END]] or [[SYSTEM]] followed by an [[INTEGER]] value.}}
* [[_SHELLHIDE]] (function) {{Text|returns the code sent by a program exit using [[END]] or [[SYSTEM]] followed by an [[INTEGER]] value.}}




* [[CALL]] (statement) {{text|sends code execution to a subroutine procedure in a program.}}
* [[CALL]] (statement) {{Text|sends code execution to a subroutine procedure in a program.}}
* [[CASE]] ([[SELECT CASE]] statement) {{text|used within a SELECT CASE block to specify a conditional value of the compared variable.}}
* [[CASE]] ([[SELECT CASE]] statement) {{Text|used within a SELECT CASE block to specify a conditional value of the compared variable.}}
* [[CASE ELSE]] ([[SELECT CASE]] statement) {{text|used in a SELECT CASE block to specify an alternative to other CASE values.}}
* [[CASE ELSE]] ([[SELECT CASE]] statement) {{Text|used in a SELECT CASE block to specify an alternative to other CASE values.}}
* [[CASE IS]] ([[SELECT CASE]] statement) {{text|used within a SELECT CASE block to specify a conditional value of the compared variable.}}
* [[CASE IS]] ([[SELECT CASE]] statement) {{Text|used within a SELECT CASE block to specify a conditional value of the compared variable.}}
* [[DO...LOOP]] (loop statement) {{text|used in programs to repeat code or return to the start of a procedure.}}
* [[DO...LOOP]] (loop statement) {{Text|used in programs to repeat code or return to the start of a procedure.}}
* [[ELSE]] (statement) {{text|used in [[IF...THEN]] statements to offer an alternative to other conditional statements.}}
* [[ELSE]] (statement) {{Text|used in [[IF...THEN]] statements to offer an alternative to other conditional statements.}}
* [[ELSEIF]] (statement) {{text|used in [[IF...THEN]] block statements to offer an alternative conditional statement.}}
* [[ELSEIF]] (statement) {{Text|used in [[IF...THEN]] block statements to offer an alternative conditional statement.}}
* [[END]] (statement) {{text|ENDs a conditional block statement, a sub-procedure or ends the program with "Press any key..."}}
* [[END]] (statement) {{Text|ENDs a conditional block statement, a sub-procedure or ends the program with "Press any key..."}}
* [[END IF]] (IF statement end) {{text|ENDs an IF statement block.}}
* [[END IF]] (IF statement end) {{Text|ENDs an IF statement block.}}
* [[ERROR]] (error statement) {{text|used to simulate an error in a program.}}
* [[ERROR]] (error statement) {{Text|used to simulate an error in a program.}}
* [[EXIT]] (statement) {{text|exits a loop, function or sub-procedure early.}}
* [[EXIT]] (statement) {{Text|exits a loop, function or sub-procedure early.}}
* [[FOR...NEXT]] (statement) {{text|a counter loop procedure that repeats code a specified number of times.}}
* [[FOR...NEXT]] (statement) {{Text|a counter loop procedure that repeats code a specified number of times.}}
* [[GOSUB]] (statement) {{text|send the program to a designated line label procedure in the main module or a [[SUB]] procedure.}}
* [[GOSUB]] (statement) {{Text|send the program to a designated line label procedure in the main module or a [[SUB]] procedure.}}
* [[GOTO]] (statement) {{text|sends the program to a designated line number or label.}}
* [[GOTO]] (statement) {{Text|sends the program to a designated line number or label.}}
* [[IF...THEN]] (statement) {{text|a conditional flow statement or block of statements.}}
* [[IF...THEN]] (statement) {{Text|a conditional flow statement or block of statements.}}
* [[LOOP]] {{text|end of a DO...LOOP procedure that repeats code until or while a condition is true.}}
* [[LOOP]] {{Text|end of a DO...LOOP procedure that repeats code until or while a condition is true.}}
* [[RESUME]] (error statement) {{text|an error statement that can return the program to the NEXT code line or a specific line number.}}
* [[RESUME]] (error statement) {{Text|an error statement that can return the program to the NEXT code line or a specific line number.}}
* [[RETURN]] (statement) {{text|a sub-procedure statement that returns the program to the code immediately after the procedure call.}}
* [[RETURN]] (statement) {{Text|a sub-procedure statement that returns the program to the code immediately after the procedure call.}}
* [[RUN]] (statement) {{text|clears and restarts the program currently in memory or executes another specified program.}}
* [[RUN]] (statement) {{Text|clears and restarts the program currently in memory or executes another specified program.}}
* [[SELECT CASE]] (statement) {{text|determines the program flow by comparing the value of a variable to specific values.}}
* [[SELECT CASE]] (statement) {{Text|determines the program flow by comparing the value of a variable to specific values.}}
* [[SHELL]] (DOS statement) {{text|directly accesses the Operating System's command line procedures.}}
* [[SHELL]] (DOS statement) {{Text|directly accesses the Operating System's command line procedures.}}
* [[SLEEP]] (statement) {{text|stops program progression for a specific number of seconds or until a keypress is made.}}
* [[SLEEP]] (statement) {{Text|stops program progression for a specific number of seconds or until a keypress is made.}}
* [[STEP]] (relational statement) {{text|is used to step through FOR loop values or use relative graphical coordinates.}}
* [[STEP]] (relational statement) {{Text|is used to step through FOR loop values or use relative graphical coordinates.}}
* [[STOP]] (statement) {{text|is used when troubleshooting a program to stop the program at a specified code line.}}
* [[STOP]] (statement) {{Text|is used when troubleshooting a program to stop the program at a specified code line.}}
* [[SYSTEM]] (statement) {{text|immediately exits a program and closes the program window.}}
* [[SYSTEM]] (statement) {{Text|immediately exits a program and closes the program window.}}
* [[UNTIL]] (conditional statement) {{text|continues a DO LOOP procedure until a condition is true.}}
* [[UNTIL]] (conditional statement) {{Text|continues a DO LOOP procedure until a condition is true.}}
* [[WHILE]] (statement) {{text|continues a DO LOOP procedure while a condition is true.}}
* [[WHILE]] (statement) {{Text|continues a DO LOOP procedure while a condition is true.}}
* [[WHILE...WEND]] (statement) {{text|a loop procedure that repeats code while a condition is true.}}
* [[WHILE...WEND]] (statement) {{Text|a loop procedure that repeats code while a condition is true.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Sounds and Music ==
== Sounds and Music ==


* [[_SNDBAL]] (statement) {{text|sets the balance or 3D position of a sound.}}
* [[_MIDISOUNDBANK]] {{Text|enables [[_SNDOPEN]] to use external FM Banks or SoundFonts when playing MIDI files.}}
* [[_SNDCLOSE]] (statement) {{text|frees and unloads an open sound using a _SNDOPEN or _SNDCOPY handle.}}
* [[$MIDISOUNDFONT]] (metacommand) ({{Text|deprecated|red}}) {{Text|enables the MIDI support for [[_SNDOPEN]].}}
* [[_SNDCOPY]] (function) {{text|copies a sound to a new handle so that two or more of the same sound can be played at once.}}
* [[_SNDBAL]] (statement) {{Text|sets the balance or 3D position of a sound.}}
* [[_SNDGETPOS]] (function) {{text|returns the current playing position in seconds of a designated sound handle.}}
* [[_SNDCLOSE]] (statement) {{Text|frees and unloads an open sound using a _SNDOPEN or _SNDCOPY handle.}}
* [[_SNDLEN]] (function) {{text|returns the length of a sound in seconds of a designated sound handle.}}
* [[_SNDCOPY]] (function) {{Text|copies a sound to a new handle so that two or more of the same sound can be played at once.}}
* [[_SNDLIMIT]] (statement) {{text|stops playing a sound after it has been playing for a set number of seconds.}}
* [[_SNDGETPOS]] (function) {{Text|returns the current playing position in seconds of a designated sound handle.}}
* [[_SNDLOOP]] (statement) {{text|loops the playing of a specified sound handle.}}
* [[_SNDLEN]] (function) {{Text|returns the length of a sound in seconds of a designated sound handle.}}
* [[_SNDOPEN]] (function) {{text|loads a sound file with certain capabilities and returns a handle value.}}
* [[_SNDLIMIT]] (statement) {{Text|stops playing a sound after it has been playing for a set number of seconds.}}
* [[_SNDPAUSE]] (statement) {{text|pauses a specified sound handle if it is playing.}}
* [[_SNDLOOP]] (statement) {{Text|loops the playing of a specified sound handle.}}
* [[_SNDPAUSED]] (function) {{text|returns the pause status of a specified sound handle.}}
* [[_SNDNEW]] (function) {{Text|creates a raw empty sound in memory and returns a LONG handle value for later access.}}
* [[_SNDPLAY]] (statement) {{text|plays a designated sound file handle.}}
* [[_SNDOPEN]] (function) {{Text|loads a sound file with certain capabilities and returns a handle value.}}
* [[_SNDPLAYCOPY]] (statement) {{text|copies a sound, plays it and automatically closes the copy using a handle parameter}}
* [[_SNDPAUSE]] (statement) {{Text|pauses a specified sound handle if it is playing.}}
* [[_SNDPLAYFILE]] (statement) {{text|a simple command to play a sound file with limited options.}}
* [[_SNDPAUSED]] (function) {{Text|returns the pause status of a specified sound handle.}}
* [[_SNDPLAYING]] (function) {{text|returns whether a sound handle is being played.}}
* [[_SNDPLAY]] (statement) {{Text|plays a designated sound file handle.}}
* [[_SNDRATE]] (function) {{text|returns the sample rate frequency per second of the current computer's sound card.}}
* [[_SNDPLAYCOPY]] (statement) {{Text|copies a sound, plays it and automatically closes the copy using a handle parameter}}
* [[_SNDRAW]] (statement) {{text|plays sound wave sample frequencies created by a program.}}
* [[_SNDPLAYFILE]] (statement) {{Text|a simple command to play a sound file with limited options.}}
* [[_SNDRAWDONE]] (statement) {{text|pads a [[_SNDRAW]] stream so the final (partially filled) buffer section is played.}}
* [[_SNDPLAYING]] (function) {{Text|returns whether a sound handle is being played.}}
* [[_SNDRAWLEN]] (function) {{text|returns the length, in seconds, of a _SNDRAW sound currently queued.}}
* [[_SNDRATE]] (function) {{Text|returns the sample rate frequency per second of the current computer's sound card.}}
* [[_SNDOPENRAW]] (function) {{text|returns a handle to a new, separate [[_SNDRAW]] audio stream.}}
* [[_SNDRAW]] (statement) {{Text|plays sound wave sample frequencies created by a program.}}
* [[_SNDSETPOS]] (statement) {{text|changes the current/starting playing position of a sound in seconds.}}
* [[_SNDRAWDONE]] (statement) {{Text|pads a [[_SNDRAW]] stream so the final (partially filled) buffer section is played.}}
* [[_SNDSTOP]] (statement) {{text|stops a playing or paused sound handle.}}
* [[_SNDRAWLEN]] (function) {{Text|returns the length, in seconds, of a _SNDRAW sound currently queued.}}
* [[_SNDVOL]] (statement) {{text|sets the volume of a sound handle being played.}}
* [[_SNDOPENRAW]] (function) {{Text|returns a handle to a new, separate [[_SNDRAW]] audio stream.}}
* [[_SNDSETPOS]] (statement) {{Text|changes the current/starting playing position of a sound in seconds.}}
* [[_SNDSTOP]] (statement) {{Text|stops a playing or paused sound handle.}}
* [[_SNDVOL]] (statement) {{Text|sets the volume of a sound handle being played.}}
* [[_WAVE]] (statement) {{Text|defines the waveform shape for a specified audio channel when used with [[SOUND]] or [[PLAY]].}}




* [[BEEP]] (statement) {{text|makes a beep sound when called or CHR$(7) is printed.}}
* [[BEEP]] (statement) {{Text|makes a beep sound when called or CHR$(7) is printed.}}
* [[PLAY]] (music statement) {{text|uses a custom string statement to play musical notes.}}
* [[PLAY]] (music statement) {{Text|uses a custom string statement to play musical notes.}}
* [[SOUND]] (statement) {{text|creates sounds of a specified frequency for a set duration.}}
* [[SOUND]] (statement) {{Text|creates sounds of a specified frequency for a set duration.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== String Text Manipulation and Conversion ==
== String Text Manipulation and Conversion ==


* [[_CLIPBOARD$]] (function) {{text|returns the current [[STRING]] contents of the system Clipboard.}}
* [[_CLIPBOARD$ (function)]] {{Text|returns the current [[STRING]] contents of the system Clipboard.}}
* [[_CLIPBOARD$ (statement)]] {{text|sets the [[STRING]] contents of the current system Clipboard.}}
* [[_CLIPBOARD$]] (statement) {{Text|sets the [[STRING]] contents of the current system Clipboard.}}
* [[_CONTROLCHR]] (statement) {{text|[[OFF]] allows the control characters to be used as text characters. [[ON]](default) can use them as commands.}}
* [[_CONTROLCHR]] (statement) {{Text|[[OFF]] allows the control characters to be used as text characters. [[ON]](default) can use them as commands.}}
* [[_CONTROLCHR (function)]]  {{text| returns the current state of _CONTROLCHR as 1 when OFF and 0 when ON.}}
* [[_CONTROLCHR (function)]]  {{Text| returns the current state of _CONTROLCHR as 1 when OFF and 0 when ON.}}
* [[_CV]] (function)  {{text|used to convert [[_MK$]] [[ASCII]] [[STRING|string]] values to numerical values.}}
* [[_CV]] (function)  {{Text|used to convert [[_MK$]] [[ASCII]] [[STRING|string]] values to numerical values.}}
* [[_MK$]] (function)  {{text|converts any numerical type into an [[ASCII]] [[STRING|string]]  value that must be converted back using [[_CV]].}}
* [[_MK$]] (function)  {{Text|converts any numerical type into an [[ASCII]] [[STRING|string]]  value that must be converted back using [[_CV]].}}
* [[_STRCMP]] (function) {{Text|compares the relationship between two strings.}}
* [[_STRICMP]] (function) {{Text|compares the relationship between two strings, without regard for case-sensitivity.}}
* [[_TOSTR$]] (function) {{Text|Returns the [[STRING]] representation of a numerical value. It's a successor of the legacy [[STR$]] function.}}




* [[ASC (statement)]] {{text|allows a QB64 program to change a character at any position of a predefined STRING.}}
* [[ASC]] (statement) {{Text|allows a QB64 program to change a character at any position of a predefined STRING.}}
* [[HEX$]] (function) {{text|returns the base 16 hexadecimal representation of an [[INTEGER]] value as a [[STRING]].}}  
* [[HEX$]] (function) {{Text|returns the base 16 hexadecimal representation of an [[INTEGER]] value as a [[STRING]].}}
* [[INSTR]] (function) {{text|searches for the first occurance of a search STRING within a string and returns the position.}}
* [[INSTR]] (function) {{Text|searches for the first occurance of a search STRING within a string and returns the position.}}
* [[LCASE$]] (function) {{text|changes the uppercase letters of a STRING to lowercase.}}
* [[LCASE$]] (function) {{Text|changes the uppercase letters of a STRING to lowercase.}}
* [[LEFT$]] (function) {{text|returns a part of a STRING from the start a designated number of character places.}}
* [[LEFT$]] (function) {{Text|returns a part of a STRING from the start a designated number of character places.}}
* [[LEN]] (function) {{text|returns the number of bytes or characters in a [[STRING]] value.}}
* [[LEN]] (function) {{Text|returns the number of bytes or characters in a [[STRING]] value.}}
* [[LSET]] (statement) {{text|left-justifies a fixed length string expression based on the size of the STRING.}}
* [[LSET]] (statement) {{Text|left-justifies a fixed length string expression based on the size of the STRING.}}
* [[LTRIM$]] (function) {{text|returns a string with all leading spaces removed.}}
* [[LTRIM$]] (function) {{Text|returns a string with all leading spaces removed.}}
* [[MID$ (statement)]] {{text|returns a portion of a string from the start position a designated number of characters.}}
* [[MID$]] (statement) {{Text|allows a QB64 program to change existing characters of a predefined STRING.}}
* [[MKD$]] (function) {{text|converts a [[DOUBLE]] numerical value into an 8 byte [[ASCII]] [[STRING]] value.}}
* [[MKD$]] (function) {{Text|converts a [[DOUBLE]] numerical value into an 8 byte [[ASCII]] [[STRING]] value.}}
* [[MKDMBF$]] (function) {{text|converts a double-precision number to a string containing a value in Microsoft Binary format.}}
* [[MKDMBF$]] (function) {{Text|converts a double-precision number to a string containing a value in Microsoft Binary format.}}
* [[MKI$]] (function) {{text|converts a numerical [[INTEGER]] value to a 2 byte [[ASCII]] string value.}}
* [[MKI$]] (function) {{Text|converts a numerical [[INTEGER]] value to a 2 byte [[ASCII]] string value.}}
* [[MKL$]] (function) {{text|converts a numerical [[LONG]] value to a 4 byte [[ASCII]] string value.}}
* [[MKL$]] (function) {{Text|converts a numerical [[LONG]] value to a 4 byte [[ASCII]] string value.}}
* [[MKS$]] (function) {{text|converts a numerical [[SINGLE]] value to a 4 byte [[ASCII]] string value.}}
* [[MKS$]] (function) {{Text|converts a numerical [[SINGLE]] value to a 4 byte [[ASCII]] string value.}}
* [[MKSMBF$]] (function) {{text|converts a single-precision number to a string containing a value in Microsoft Binary format.}}}}
* [[MKSMBF$]] (function) {{Text|converts a single-precision number to a string containing a value in Microsoft Binary format.}}}}
* [[OCT$]] (function) {{text|returns the base 8 Octal representation of an INTEGER value.}}
* [[OCT$]] (function) {{Text|returns the base 8 Octal representation of an INTEGER value.}}
* [[RIGHT$]] (function) {{text|returns a set number of characters in a STRING variable starting from the end.}}
* [[RIGHT$]] (function) {{Text|returns a set number of characters in a STRING variable starting from the end.}}
* [[RSET]] (statement) {{text|right-justifies a string according to length of the string expression.}}
* [[RSET]] (statement) {{Text|right-justifies a string according to length of the string expression.}}
* [[RTRIM$]] (function) {{text|returns a string with all of the spaces removed at the right end of a string.}}
* [[RTRIM$]] (function) {{Text|returns a string with all of the spaces removed at the right end of a string.}}
* [[SPACE$]] (function) {{text|returns a STRING consisting of a number of space characters.}}
* [[SPACE$]] (function) {{Text|returns a STRING consisting of a number of space characters.}}
* [[STR$]] (function) {{text|converts a numerical value to a [[STRING]].}}
* [[STR$]] (function) {{Text|converts a numerical value to a [[STRING]].}}
* [[STRING]] ($ variable type) {{text|one byte text variable with [[ASCII]] code values from 0 to 255.}}
* [[STRING]] ($ variable type) {{Text|one byte text variable with [[ASCII]] code values from 0 to 255.}}
* [[STRING$]] (function)  {{text|returns a STRING consisting of a single character repeated a set number of times.}}
* [[STRING$]] (function)  {{Text|returns a STRING consisting of a single character repeated a set number of times.}}
* [[SWAP]] (statement)  {{text|used to exchange two string variable or array element values.}}
* [[SWAP]] (statement)  {{Text|used to exchange two string variable or array element values.}}
* [[UCASE$]] (function) {{text|returns a string with all letters as uppercase.}}
* [[UCASE$]] (function) {{Text|returns a string with all letters as uppercase.}}
* [[VAL]] (function) {{text|converts a string number value to a numerical value.}}
* [[VAL]] (function) {{Text|converts a string number value to a numerical value.}}




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Sub procedures and Functions ==  
 
== Sub procedures and Functions ==


<center>'''QBasic and QB64'''</center>
<center>'''QBasic and QB64'''</center>
* [[CALL]] (statement) {{text|sends code execution to a [[SUB]] procedure in a program. Parameter brackets are required when used.}}
* [[CALL]] (statement) {{Text|sends code execution to a [[SUB]] procedure in a program. Parameter brackets are required when used.}}
* [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{text|used to access Interrupts on the computer or execute assembly type procedures.}}
* [[CALL ABSOLUTE|CALL ABSOLUTE]] (statement) {{Text|used to access Interrupts on the computer or execute assembly type procedures.}}
* [[CHAIN]] (statement) {{text|changes seamlessly from one program module to another.}}
* [[CHAIN]] (statement) {{Text|changes seamlessly from one program module to another.}}
* DECLARE (BASIC statement) {{text|used to tell that a SUB or FUNCTION is created to be used in the program. NOT USED by QB64!}}
* DECLARE (BASIC statement) {{Text|used to tell that a SUB or FUNCTION is created to be used in the program. NOT USED by QB64!}}
* [[END]] (statement) {{text|ends a [[SUB]] or [[FUNCTION]] procedure.}}
* [[END]] (statement) {{Text|ends a [[SUB]] or [[FUNCTION]] procedure.}}
* [[EXIT]] (statement) {{text|exits a [[SUB]] or [[FUNCTION]] procedure early.}}
* [[EXIT]] (statement) {{Text|exits a [[SUB]] or [[FUNCTION]] procedure early.}}
* [[FUNCTION]] (statement) {{text|a procedure that holds ONE return value in the function's name which is a variable type. }}
* [[FUNCTION]] (statement) {{Text|a procedure that holds ONE return value in the function's name which is a variable type. }}
* [[GOSUB]] (statement) {{text|sends the program to a sub program that uses a line number or label.}}
* [[GOSUB]] (statement) {{Text|sends the program to a sub program that uses a line number or label.}}
* [[$INCLUDE]] (metacommand) {{text|used to insert a source code text file into your program at the point of the insertion.}}
* [[$INCLUDE]] (metacommand) {{Text|used to insert a source code text file into your program at the point of the insertion.}}
* [[INTERRUPT]] (statement) {{text|a built in assembly routine for accessing computer information registers.}}
* [[INTERRUPT]] (statement) {{Text|a built in assembly routine for accessing computer information registers.}}
* [[RETURN]] (statement) {{text|used in GOSUB procedures to return to the original call code line.}}
* [[RETURN]] (statement) {{Text|used in GOSUB procedures to return to the original call code line.}}
* [[RUN]] (statement) {{text| flow statement that clears and restarts the program currently in memory or executes another specified program.}}
* [[RUN]] (statement) {{Text| flow statement that clears and restarts the program currently in memory or executes another specified program.}}
* [[SHARED]] (statement) defines a variable or list of variables as shared with the main program module.}}
* [[SHARED]] (statement) defines a variable or list of variables as shared with the main program module.}}
* [[SHELL]] (statement) {{text|allows a program to use OS command lines.}}
* [[SHELL]] (statement) {{Text|allows a program to use OS command lines.}}
* [[STATIC]] (statement) {{text|defines a variable or list of variables that will retain their values after the sub-procedure is exited.}}
* [[STATIC]] (statement) {{Text|defines a variable or list of variables that will retain their values after the sub-procedure is exited.}}
* [[SUB]] (statement) {{text|procedures are programs within programs that can return multiple calculations.}}
* [[SUB]] (statement) {{Text|procedures are programs within programs that can return multiple calculations.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== TCP/IP Networking and Email ==
 
== TCP/IP Networking HTTP(S) and Email ==


<center>'''All Statements and Functions Compile in QB64 Only!'''</center>
<center>'''All Statements and Functions Compile in QB64 Only!'''</center>




* [[_CONNECTED]] (function) {{text|returns the connection status of a TCP/IP connection handle.}}
* [[_CONNECTED]] (function) {{Text|returns the connection status of a TCP/IP connection handle.}}
* [[_CONNECTIONADDRESS$]] (function) {{text| function returns a connected user's [[STRING]] IP address value.}}
* [[_CONNECTIONADDRESS$]] (function) {{Text| function returns a connected user's [[STRING]] IP address value.}}
* [[_STATUSCODE]] (function) {{Text|gives the HTTP status code of an HTTP response that was opened using [[_OPENCLIENT]].}}




* [[_OPENCLIENT]] (function) {{text|connects to a Host on the Internet as a Client and returns the Client status handle.}}
* [[_OPENCLIENT]] (function) {{Text|connects to a Host on the Internet as a Client and returns the Client status handle.}}
* [[_OPENCONNECTION]] (function) {{text|open's a connection from a client that the host has detected and returns a status handle.}}
* [[_OPENCONNECTION]] (function) {{Text|open's a connection from a client that the host has detected and returns a status handle.}}
* [[_OPENHOST]] (function) {{text|opens a Host which listens for new connections and returns a Host status handle.}}
* [[_OPENHOST]] (function) {{Text|opens a Host which listens for new connections and returns a Host status handle.}}




* [[CLOSE]] (statement) {{text|closes an opened internet connection using the handle assigned in an OPEN statement.}}
* [[CLOSE]] (statement) {{Text|closes an opened internet connection using the handle assigned in an OPEN statement.}}




* [[GET (TCP/IP statement)]] {{text|reads unformatted(raw) data from an opened connection using the connection handle.}}
* [[GET (HTTP statement)]] {{Text|reads the response of an HTTP request that was opened using [[_OPENCLIENT]].}}
* [[GET (TCP/IP statement)]] {{Text|reads a TCP/IP connection port to return a value.}}


* [[PUT (TCP/IP statement)]] {{text|sends unformatted(raw) data to an open connection using a user's handle.}}
* [[PUT (TCP/IP statement)]] {{Text|sends unformatted(raw) data to an open connection using a user's handle.}}




Line 954: Line 861:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Text on Screen ==
== Text on Screen ==
* [[_CONTROLCHR]] {{text|[[OFF]] allows [[ASCII]] characters 0 to 31 to be used as text characters. [[ON]](default) resets to default usage.}}
* [[_CONTROLCHR]] {{Text|[[OFF]] allows [[ASCII]] characters 0 to 31 to be used as text characters. [[ON]](default) resets to default usage.}}
* [[_FONT (function)]] {{text|creates a new alphablended font handle from a designated image handle}}
* [[_FONT (function)]] {{Text|creates a new alphablended font handle from a designated image handle}}
* [[_FONT]] (statement) {{text|sets the current [[_LOADFONT]] function font handle to be used by [[PRINT]] or [[_PRINTSTRING]].}}
* [[_FONT]] (statement) {{Text|sets the current [[_LOADFONT]] function font handle to be used by [[PRINT]] or [[_PRINTSTRING]].}}
* [[_MAPUNICODE]] (statement) {{text|maps a [[Unicode]] value to an [[ASCII]] character code value.}}
* [[_MAPUNICODE]] (statement) {{Text|maps a [[Unicode]] value to an [[ASCII]] character code value.}}
* [[_PRINTSTRING]] (statement) {{text|prints text or custom font strings using graphic column and row coordinate positions.}}
* [[_PRINTSTRING]] (statement) {{Text|prints text or custom font strings using graphic column and row coordinate positions.}}
* [[_SCREENPRINT]] (statement) {{text|simulates typing text into a Windows program using the keyboard.}}
* [[_SCREENPRINT]] (statement) {{Text|simulates typing text into a Windows program using the keyboard.}}
* [[_TOSTR$]] (function) {{Text|Returns the [[STRING]] representation of a numerical value. It's a successor of the legacy [[STR$]] function.}}
* [[_UCHARPOS]] (function) {{Text|calculates the starting pixel positions of every character of a (unicode) text string.}}
* [[_UPRINTSTRING]] (statement) {{Text|locates and prints a (unicode) text [[STRING|string]] using graphic coordinates.}}




* [[CHR$]] (function) {{text|returns the text character associated with a certain [[ASCII]] character code as a one byte [[STRING]].}}
* [[CHR$]] (function) {{Text|returns the text character associated with a certain [[ASCII]] character code as a one byte [[STRING]].}}
* [[CLS]] (statement) {{text|clears a screen page or the program [[SCREEN]]. QB64 can clear with a color.}}
* [[CLS]] (statement) {{Text|clears a screen page or the program [[SCREEN]]. QB64 can clear with a color.}}
* [[COLOR]] (statement) {{text|used to change the color of the text and background in some legacy screen modes.}}
* [[COLOR]] (statement) {{Text|used to change the color of the text and background in some legacy screen modes.}}
* [[CSRLIN]] (function) {{text|returns the current print cursor row position on the screen.}}
* [[CSRLIN]] (function) {{Text|returns the current print cursor row position on the screen.}}
* [[INPUT]] (statement) {{text|requests a [[STRING]] or numerical keyboard entry from a program user.}}
* [[INPUT]] (statement) {{Text|requests a [[STRING]] or numerical keyboard entry from a program user.}}
* [[KEY LIST]] (statement) {{text|vertically lists all the [[ON KEY(n)]] softkey strings associated with each function key F1 to F12.}}
* [[KEY LIST]] (statement) {{Text|vertically lists all the [[ON KEY(n)]] softkey strings associated with each function key F1 to F12.}}
* [[LINE INPUT]] (statement) {{text|requests a [[STRING]] keyboard entry from a program user.}}
* [[LINE INPUT]] (statement) {{Text|requests a [[STRING]] keyboard entry from a program user.}}
* [[LOCATE]] (statement) {{text|locates the screen text row and column positions for a [[PRINT]] or [[INPUT]] procedure.}}
* [[LOCATE]] (statement) {{Text|locates the screen text row and column positions for a [[PRINT]] or [[INPUT]] procedure.}}
* [[POS]] (function) {{text|returns the current print cursor column position.}}
* [[POS]] (function) {{Text|returns the current print cursor column position.}}
* [[PRINT]] (statement) {{text|prints numeric or [[STRING|string]] expressions to the program screen.}}
* [[PRINT]] (statement) {{Text|prints numeric or [[STRING|string]] expressions to the program screen.}}
* [[PRINT USING]] (statement) {{text|prints template formatted numeric or string values to the program screen.}}
* [[PRINT USING]] (statement) {{Text|prints template formatted numeric or string values to the program screen.}}
* [[SCREEN]] (statement) {{text|sets the screen mode of a program. No statement defaults the program to SCREEN 0 text mode.}}
* [[SCREEN]] (statement) {{Text|sets the screen mode of a program. No statement defaults the program to SCREEN 0 text mode.}}
* [[SCREEN (function)]] {{text|returns the [[ASCII]] code of a text character or the color attribute at a set text location on the screen.}}
* [[SCREEN (function)]] {{Text|returns the [[ASCII]] code of a text character or the color attribute at a set text location on the screen.}}
* [[SPACE$]] (function) {{text|returns a [[STRING|string]] consisting of a number of space characters.}}
* [[SPACE$]] (function) {{Text|returns a [[STRING|string]] consisting of a number of space characters.}}
* [[SPC]] (function) {{text|used in [[PRINT]] and [[LPRINT]] statements to print or output a number of space characters.}}
* [[SPC]] (function) {{Text|used in [[PRINT]] and [[LPRINT]] statements to print or output a number of space characters.}}
* [[STR$]] (function) {{text|returns the [[STRING]] representation of a numerical value.}}
* [[STR$]] (function) {{Text|returns the [[STRING]] representation of a numerical value.}}
* [[STRING$]](function) {{text| returns a [[STRING]] consisting of a single character repeated a set number of times.}}
* [[STRING$]](function) {{Text| returns a [[STRING]] consisting of a single character repeated a set number of times.}}
* [[TAB]] (function) {{text|used in [[PRINT]] and [[LPRINT]] statements to move to a specified text column position.}}
* [[TAB]] (function) {{Text|used in [[PRINT]] and [[LPRINT]] statements to move to a specified text column position.}}
* [[VIEW PRINT]] (statement) {{text|defines the boundaries of a text viewport [[PRINT]] area.}}
* [[VIEW PRINT]] (statement) {{Text|defines the boundaries of a text viewport [[PRINT]] area.}}
* [[WIDTH]] (statement) {{text|changes the text dimensions of certain [[SCREEN]] modes or printer page widths}}
* [[WIDTH]] (statement) {{Text|changes the text dimensions of certain [[SCREEN]] modes or printer page widths}}
* [[WRITE]] (screen I/O statement) {{text|writes a comma-separated list of values to the screen.}}
* [[WRITE]] (screen I/O statement) {{Text|writes a comma-separated list of values to the screen.}}




<center> See also: [[#Fonts and Unicode:|Fonts and Unicode]] or [[ASCII|ASCII Code Table]]</center>
<center>See also: [[#Fonts_and_Unicode:|Fonts and Unicode]] or [[ASCII|ASCII Code Table]]</center>


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Time, Date and Timing ==
== Time, Date and Timing ==


* [[_AUTODISPLAY]] (statement) {{text|enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].}}
* [[_AUTODISPLAY]] (statement) {{Text|enables the automatic display of the screen image changes previously disabled by [[_DISPLAY]].}}
* [[_DELAY]] (statement) {{text|suspends program execution for a [[SINGLE]] value of seconds down to milliseconds.}}
* [[_DELAY]] (statement) {{Text|suspends program execution for a [[SINGLE]] value of seconds down to milliseconds.}}
* [[_DISPLAY]] (statement) {{text|turns off automatic display while only displaying the screen changes when called.}}
* [[_DISPLAY]] (statement) {{Text|turns off automatic display while only displaying the screen changes when called.}}
*[[_FREETIMER]] (function) {{text|returns a free TIMER number for multiple [[ON TIMER(n)]] events.}}
*[[_FREETIMER]] (function) {{Text|returns a free TIMER number for multiple [[ON TIMER(n)]] events.}}
* [[_KEYDOWN]] (function) {{text|returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.}}
* [[_KEYDOWN]] (function) {{Text|returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.}}
* [[_KEYHIT]] (function) {{text|returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.}}
* [[_KEYHIT]] (function) {{Text|returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.}}
* [[_LIMIT]] (statement) {{text|sets the loop repeat rate of a program to so many per second, relinquishing spare cpu cycles.}}
* [[_LIMIT]] (statement) {{Text|sets the loop repeat rate of a program to so many per second, relinquishing spare cpu cycles.}}




* [[DATE$]] (function) {{text|returns the present computer date in a mm-dd-yyyy [[STRING|string]] format}}
* [[DATE$]] (function) {{Text|returns the present computer date in a mm-dd-yyyy [[STRING|string]] format}}


* [[INKEY$]] (function) {{text| can be used in a loop to wait for a keypress or a [Ctrl] + letter key combination.}}
* [[INKEY$]] (function) {{Text| can be used in a loop to wait for a keypress or a [Ctrl] + letter key combination.}}
* [[INPUT]] (statement) {{text|can be used to wait for an [Enter] key press or a text or numerical menu entry.}}
* [[INPUT]] (statement) {{Text|can be used to wait for an [Enter] key press or a text or numerical menu entry.}}
* [[INPUT$]] (function) {{text|can be used to wait for a key press or a fixed length text entry.}}
* [[INPUT$]] (function) {{Text|can be used to wait for a key press or a fixed length text entry.}}
* [[ON KEY(n)]] (event statement) {{text|executes when a keypress or keypress combination occurs.}}
* [[ON KEY(n)]] (event statement) {{Text|executes when a keypress or keypress combination occurs.}}
* [[ON TIMER(n)]] (event statement) {{text|executes when a timed event occurs. QB64 can use multiple numbered timer events.}}
* [[ON TIMER(n)]] (event statement) {{Text|executes when a timed event occurs. QB64 can use multiple numbered timer events.}}


* [[SLEEP]] (statement) {{text|pauses the program for a specified number of seconds or a until a key press is made.}}
* [[SLEEP]] (statement) {{Text|pauses the program for a specified number of seconds or a until a key press is made.}}
* [[TIME$]] (function) {{text|returns the present computer time in a hh:mm:ss 24 hour [[STRING|string]] format}}
* [[TIME$]] (function) {{Text|returns the present computer time in a hh:mm:ss 24 hour [[STRING|string]] format}}


* [[TIMER]] (function) {{text|returns the number of seconds past the previous midnite down to a QB64 accuracy of one millisecond.}}
* [[TIMER (function)]] {{Text|returns the number of seconds past the previous midnite down to a QB64 accuracy of one millisecond.}}
* [[TIMER (statement)]] {{text|enables, turns off or stops timer event trapping. In QB64 TIMER(n) FREE can free multiple timers. }}
* [[TIMER]] (statement) {{Text|enables, turns off or stops timer event trapping. In QB64 TIMER(n) FREE can free multiple timers. }}


* [[WAIT]] (statement) {{text|normally used to delay program display execution during or after vertical retrace periods.}}
* [[WAIT]] (statement) {{Text|normally used to delay program display execution during or after vertical retrace periods.}}


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== Window and Desktop ==
== Window and Desktop ==
Line 1,024: Line 937:
<center>'''All Statements and Functions except [[SCREEN]] Compile in QB64 Only!'''</center>
<center>'''All Statements and Functions except [[SCREEN]] Compile in QB64 Only!'''</center>


* [[_FULLSCREEN (function)]] {{text|returns the present full screen mode setting number of the screen window.}}
* [[_COLORCHOOSERDIALOG]] (function) {{Text|Displays a standard color picker dialog box and returns a 32-bit RGBA color selected by the user.}}
* [[_FULLSCREEN]] (statement) {{text|sets the full screen mode of the screen window. Alt + Enter can do it manually.}}
* [[_DESKTOPHEIGHT]] (function) {{Text|returns the height of the desktop (not program window).}}
* [[_HEIGHT]] (function) {{text|returns the height of a [[_SCREENIMAGE]] handle to get the desktop resolution.}}
* [[_DESKTOPWIDTH]] (function) {{Text|returns the width of the desktop (not program window).}}
* [[_ICON]] (statement) {{text|creates a program icon from an image file handle created by [[_LOADIMAGE]]. Cannot use .ICO files!}}
* [[_FULLSCREEN (function)]] {{Text|returns the present full screen mode setting number of the screen window.}}
* [[_NEWIMAGE]] (statement) {{text|function prepares a window image surface and returns the handle value.}}
* [[_FULLSCREEN]] (statement) {{Text|sets the full screen mode of the screen window. Alt + Enter can do it manually.}}
* [[$RESIZE]] ([[Metacommand]]) {{text|used with ON allows a user to resize the program window where OFF does not.}}
* [[_HEIGHT]] (function) {{Text|returns the height of a [[_SCREENIMAGE]] handle to get the desktop resolution.}}
* [[_RESIZE (function)]] {{text|returns -1 when a program user attempts to resize the program screen.}}
* [[_ICON]] (statement) {{Text|creates a program icon from an image file handle created by [[_LOADIMAGE]]. Cannot use .ICO files!}}
* [[_RESIZEHEIGHT]] (function) {{text|returns the requested new user screen height when [[$RESIZE]]:ON allows it.}}
* [[_INPUTBOX$]] (function) {{Text|Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box.}}
* [[_RESIZEWIDTH]] (function) {{text|returns the requested new user screen width when [[$RESIZE]]:ON allows it.}}
* [[_MESSAGEBOX (function)]] {{Text|Displays a message dialog box, which presents a message and returns the button ID clicked by the user.}}
* [[_SCREENCLICK]]  {{text|simulates clicking the mouse at a position on the screen to get focus.}}
* [[_MESSAGEBOX]] (statement) {{Text|Displays a message dialog box, which presents a message to the user.}}
* [[_SCREENEXISTS]] (function) {{text|returns a -1 value once a screen has been created.}}
* [[_NEWIMAGE]] (statement) {{Text|function prepares a window image surface and returns the handle value.}}
* [[$SCREENHIDE]] (QB64 [[Metacommand]]) {{text|hides the program window throughout the program until [[$SCREENSHOW]] is used.}}
* [[_NOTIFYPOPUP]] (statement) {{Text|Shows a system notification popup.}}
* [[_SCREENHIDE]] (statement) {{text|hides the main program window in a section of code until [[_SCREENSHOW]] is used.}}
* [[_OPENFILEDIALOG$]] (function) {{Text|Displays a standard dialog box that prompts the user to open a file.}}
* [[_SCREENIMAGE]] (function) {{text|creates an image of the current desktop and returns an image handle.}}
* [[$RESIZE]] (metacommand) {{Text|used with ON allows a user to resize the program window where OFF does not.}}
* [[_SCREENMOVE]] (statement) {{text|positions the program window on the desktop using designated coordinates or _MIDDLE.}}
* [[_RESIZE (function)]] {{Text|returns -1 when a program user attempts to resize the program screen.}}
* [[_SCREENPRINT]] (statement) {{text|simulates typing text into a Windows program using the keyboard.}}
* [[_RESIZEHEIGHT]] (function) {{Text|returns the requested new user screen height when [[$RESIZE]]:ON allows it.}}
* [[$SCREENSHOW]] (QB64 [[Metacommand]]) {{text|displays the main program window throughout the program after [[$SCREENHIDE]].}}
* [[_RESIZEWIDTH]] (function) {{Text|returns the requested new user screen width when [[$RESIZE]]:ON allows it.}}
* [[_SCREENSHOW]] (statement) {{text|displays the main program window in a section of code after [[_SCREENHIDE]] has been used.}}
* [[_SAVEFILEDIALOG$]] (function) {{Text|Displays a standard dialog box that prompts the user to save a file.}}
* [[_SCREENX]] (function) {{text|returns the current program window's upper left corner column position on the desktop.}}
* [[_SCREENCLICK]]  {{Text|simulates clicking the mouse at a position on the screen to get focus.}}
* [[_SCREENY]] (function) {{text|returns the current program window's upper left corner row position on the desktop.}}
* [[_SCREENEXISTS]] (function) {{Text|returns a -1 value once a screen has been created.}}
* [[_TITLE]] (statement) {{text|sets the program name [[STRING|string]] in the title bar of the program window.}}
* [[$SCREENHIDE]] (metacommand) {{Text|hides the program window throughout the program until [[$SCREENSHOW]] is used.}}
* [[_WIDTH (function)]] {{text|returns the width of a [[_SCREENIMAGE]] handle to get the desktop resolution.}}
* [[_SCREENHIDE]] (statement) {{Text|hides the main program window in a section of code until [[_SCREENSHOW]] is used.}}
* [[_SCREENIMAGE]] (function) {{Text|creates an image of the current desktop and returns an image handle.}}
* [[_SCREENMOVE]] (statement) {{Text|positions the program window on the desktop using designated coordinates or _MIDDLE.}}
* [[_SCREENPRINT]] (statement) {{Text|simulates typing text into a Windows program using the keyboard.}}
* [[$SCREENSHOW]] (metacommand) {{Text|displays the main program window throughout the program after [[$SCREENHIDE]].}}
* [[_SCREENSHOW]] (statement) {{Text|displays the main program window in a section of code after [[_SCREENHIDE]] has been used.}}
* [[_SCREENX]] (function) {{Text|returns the current program window's upper left corner column position on the desktop.}}
* [[_SCREENY]] (function) {{Text|returns the current program window's upper left corner row position on the desktop.}}
* [[_SELECTFOLDERDIALOG$]] (function) {{Text|Displays a dialog box that enables the user to select a folder (directory).}}
* [[_SMOOTH (function)]] {{Text|checks whether the current [[_FULLSCREEN]] mode has antialiasing enabled or not.}}
* [[_TITLE]] (statement) {{Text|sets the program name [[STRING|string]] in the title bar of the program window.}}
* [[_WIDTH (function)]] {{Text|returns the width of a [[_SCREENIMAGE]] handle to get the desktop resolution.}}




* [[SCREEN]] {{text|sets the screen mode of a program. No statement defaults the program to SCREEN 0 text mode.}}
* [[SCREEN]] {{Text|sets the screen mode of a program. No statement defaults the program to SCREEN 0 text mode.}}




<center>''See also:'' [[C_Libraries#Console_Window|Console Window]],  [[Windows_Libraries#Hot_Keys_.28maximize.29|Windows Hot Keys]] or [[Windows_Libraries#Focus|Focus on Program]].</center>
<center>See also: [[C Libraries#Console_Window|Console Window]],  [[Windows Libraries#Hot_Keys_(maximize)|Windows Hot Keys]] or [[Windows Libraries#Focus|Focus on Program]].</center>


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>


== QB64 Programming Symbols ==
== QB64 Programming Symbols ==
Line 1,065: Line 990:
* [[Semicolon|; Semicolon]] after a [[PRINT]] stops the invisible cursor at end of the printed value. Can prevent screen rolling!
* [[Semicolon|; Semicolon]] after a [[PRINT]] stops the invisible cursor at end of the printed value. Can prevent screen rolling!
* [[Comma|, Comma]] after a [[PRINT]] tabs the invisible cursor past the end of the printed value.
* [[Comma|, Comma]] after a [[PRINT]] tabs the invisible cursor past the end of the printed value.
* [[Quotation mark|" Quotation mark]] delimits the ends of a literal [[STRING]] value in a [[PRINT]], [[INPUT]] or [[LINE INPUT]] statement.  
* [[Quotation mark|" Quotation mark]] delimits the ends of a literal [[STRING]] value in a [[PRINT]], [[INPUT]] or [[LINE INPUT]] statement.
* [[Question mark|? Question mark]] is a shortcut substitute for the [[PRINT]] keyword. Will change to PRINT when cursor leaves the code line.
* [[Question mark|? Question mark]] is a shortcut substitute for the [[PRINT]] keyword. Will change to PRINT when cursor leaves the code line.




:'''Program Code Markers'''
:'''Program Code Markers'''
* [[Apostrophe|' Apostrophe]] denotes a program comment, to ignore a code line or a QBasic [[Metacommand]]. Same as using [[REM]].
* [[Apostrophe|' Apostrophe]] denotes a program comment, to ignore a code line or a legacy QBasic [[Metacommand]]. Same as using [[REM]].
* [[Comma|, Comma]] is a statement variable or [[DATA]], [[SUB]] or [[FUNCTION]] parameter separator.  
* [[Comma|, Comma]] is a statement variable or [[DATA]], [[SUB]] or [[FUNCTION]] parameter separator.
* [[: Colon]]s can be used to separate two procedure statements on one code line.
* [[: Colon]]s can be used to separate two procedure statements on one code line.
* [[Dollar_Sign|$ Dollar sign]] prefix denotes a QBasic [[Metacommand]]. Only '''QB64''''s event [[$CHECKING]] should NOT be commented.  
* [[Dollar Sign|$ Dollar sign]] used as prefix denotes a [[Metacommand]], used as suffix it denotes a [[STRING]] variable.
* [[Parenthesis|( ) Parenthesis]] enclose a math or conditional procedure order, [[SUB]] or [[FUNCTION]] parameters or to pass by value.
* [[Parenthesis|( ) Parenthesis]] enclose a math or conditional procedure order, [[SUB]] or [[FUNCTION]] parameters or to pass by value.
* [[+|+ Plus]] [[concatenation]] operator MUST be used to combine literal string values in a variable definition.
* [[+|+ Plus]] [[concatenation]] operator MUST be used to combine literal string values in a variable definition.
* [[Quotation mark|" Quotation mark]] delimits the ends of a literal [[STRING]] value. Use [[CHR$]](34) to insert quotes in a text [[STRING]].
* [[Quotation mark|" Quotation mark]] delimits the ends of a literal [[STRING]] value. Use [[CHR$]](34) to insert quotes in a text [[STRING]].
* [[REM]] or apostrophe are used to make comments or ignore code or precedes a [[Metacommand]].
* [[REM]] or apostrophe are used to make comments or ignore code or precedes a legacy QBasic [[Metacommand]].
* [[Underscore|_ Underscore]] at the end of a code line is used to continue a line of code to the next program line in '''QB64 only'''.
* [[Underscore|_ Underscore]] at the end of a code line is used to continue a line of code to the next program line in '''QB64 only'''.


Line 1,090: Line 1,015:
* [[INTEGER|% INTEGER]] [[INTEGER|whole]] numerical type (2 bytes)
* [[INTEGER|% INTEGER]] [[INTEGER|whole]] numerical type (2 bytes)
* [[LONG|& LONG]] [[INTEGER|whole]] numerical type (4 bytes}
* [[LONG|& LONG]] [[INTEGER|whole]] numerical type (4 bytes}
* [[_INTEGER64|&& _INTEGER64]] '''QB64''' [[INTEGER|whole]] numerical type (8 bytes)  
* [[_INTEGER64|&& _INTEGER64]] '''QB64''' [[INTEGER|whole]] numerical type (8 bytes)
* [[_BIT|` _BIT]] '''QB64''' [[INTEGER|whole]] numerical type (1 bit)(Key below tilde(~) or [[CHR$]](96))
* [[_BIT|` _BIT]] '''QB64''' [[INTEGER|whole]] numerical type (1 bit)(Key below tilde(~) or [[CHR$]](96))
* [[_BYTE|%% _BYTE]] '''QB64''' [[INTEGER|whole]] numerical type (1 byte)
* [[_BYTE|%% _BYTE]] '''QB64''' [[INTEGER|whole]] numerical type (1 byte)
Line 1,114: Line 1,039:
:'''[[Relational Operations]]'''
:'''[[Relational Operations]]'''
* [[Equal|=]] (Equal to condition)
* [[Equal|=]] (Equal to condition)
* [[Greater_Than|>]] (Greater than condition)
* [[Greater Than|>]] (Greater than condition)
* [[Less_Than|<]] (Less than condition)
* [[Less Than|<]] (Less than condition)
* [[Not_Equal|<>]] (Not equal to condition)
* [[Not Equal|<>]] (Not equal to condition)
* [[Greater_Than_Or_Equal|>=]] (Greater than or equal to condition)
* [[Greater Than Or Equal|>=]] (Greater than or equal to condition)
* [[Less_Than_Or_Equal|<=]] (Less than or equal to condition)
* [[Less Than Or Equal|<=]] (Less than or equal to condition)


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
== QB64 Programming References ==
<center>'''WIKI Pages'''
[[Keyword Reference - Alphabetical#QB64 specific keywords:|Go to QB64 specific keywords]]
[[Keyword Reference - Alphabetical#Original QBasic keywords:|Go to Top of Original QB keywords]]
[[Keyword Reference - Alphabetical|Go to Alphabetical keywords]]
[[Main_Page#Appendix:|Main Page with Appendix and Tutorials]]
'''Got a question about something?'''
[[QB64 FAQ|Visit the QB64 FAQ]]
[http://qb64phoenix.com Visit the QB64 Main Site]
[http://qb64phoenix.com/forum/index.php Visit QB64 Community Forum]




<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
{{PageReferences}}

Revision as of 20:24, 21 November 2024


Arrays and Data Storage

Arrays
  • _DEFINE (statement) defines a range of untyped variable names according to their first character as a datatype.
  • _PRESERVE (REDIM option) preserves the existing element values when an array is resized.
  • CLEAR (statement) resets all variable values and array element values to 0 or null strings and closes all open files.
  • DIM (statement) dimensions(sizes) a static array and defines the type.
  • $DYNAMIC (metacommand) defines that all arrays are dynamic or changeable in size.
  • ERASE (array statement) clears a static array of all values and totally removes a dynamic array.
  • LBOUND (function) returns the lowest valid index (lower boundary) of an array.
  • OPTION BASE (statement) sets the default starting index of an array to 0 or 1.
  • REDIM (statement) re-dimensions the number of elements in a dynamic(resizeable) array and defines the type.
  • SHARED (statement) designates variable values that can be shared with sub-procedures without using parameters.
  • STATIC (statement) defines a variable or list of variables that will retain their values after the sub-procedure is exited.
  • $STATIC (metacommand) defines that all arrays are static or unchangeable in size.
  • SWAP (statement) trades the values of two numerical or string values or array elements.
  • UBOUND (function) returns the highest valid index (upper boundary) of an array.

See also: Arrays


Fixed read-only storage
  • DATA (statement) creates a field of built-in program data values separated by commas.
  • READ (statement) reads the DATA from the data field sequentially.
  • RESTORE (statement) sets the data pointer to the start of all DATA or a specified DATA field.
  • $EMBED (metacommand) is used to embed any file's contents into the compiled executable.
  • _EMBEDDED$ (function) recalls the contents of a file embedded using $EMBED.

(Return to Table of Contents)


Colors and Transparency

  • _ALPHA (function) returns the alpha channel transparency level of a color value used on a screen page or image.
  • _ALPHA32 (function) function returns the alpha channel level of a 32 bit color value only.
  • _BACKGROUNDCOLOR (function) returns the current background color for an image handle or page.
  • _BLEND (statement) turns on alpha blending for the current image or a specific one.
  • _BLEND (function) returns if blending is enabled or disabled for the current window or a specified image handle.
  • _BLINK (statement) statement turns blinking colors on/off in SCREEN 0
  • _BLINK (function) returns -1 if enabled or 0 if disabled by _BLINK statement.
  • _BLUE (function) returns the palette intensity OR the blue component intensity of a 32-bit image color.
  • _BLUE32 (function) returns the blue component intensity of a 32-bit image color.
  • _CLEARCOLOR (statement) sets a specific color to be treated as transparent in an image
  • _CLEARCOLOR (function) returns the current transparent color of an image.
  • _COLORCHOOSERDIALOG (function) Displays a standard color picker dialog box and returns a 32-bit RGBA color selected by the user.
  • _COPYPALETTE (statement) copies the color palette intensities from one image to another image or screen page.
  • _DEFAULTCOLOR (function) returns the current default (text/drawing) color for an image handle or page.
  • _DONTBLEND (statement) turns off alpha blending for an image handle.
  • _GREEN (function) returns the palette index OR the green component intensity of a 32-bit image.
  • _GREEN32 (function) returns the green component intensity of a 32-bit image color.
  • _NEWIMAGE (function) prepares a custom sized program SCREEN or page surface that can use 256 or 32 bit colors.
  • _PALETTECOLOR (statement) sets the color value of a palette entry of an image using 256 color modes or less (4 or 8 BPP).
  • _PALETTECOLOR (function) returns the 32 bit attribute color setting of an image or screen page handle's palette.
  • _PIXELSIZE (function) returns the color depth (Bits Per Pixel) of an image.
  • _RED (function) returns the palette index OR the red component intensity of a 32-bit screen.
  • _RED32 (function) returns the red component intensity of a 32-bit image color.
  • _RGB (function) returns the closest palette attribute index OR the LONG 32 bit color value in 32 bit screens.
  • _RGB32 (function) returns the LONG 32 bit color value only.
  • _RGBA (function) returns the closest palette attribute index OR the LONG 32 bit color value in _ALPHA screens.
  • _RGBA32 (function) returns the LONG 32 bit _ALPHA color value only.
  • _SETALPHA (statement) sets the alpha channel transparency level of some or all of the pixel colors of an image.


  • CLS (statement) clears the screen and can set the background color in QB64.
  • COLOR (statement) sets the current text color attribute or _RGB value to be used or background colors in some screen modes.
  • INP (function) returns the RGB color intensity values from color port register &H3C9 for a specific attributes.
  • OUT (statement) sets the color port access mode and sets the RGB color intensity values using &H3C9.
  • PALETTE (statement) sets the Red, Green and Blue color attribute intensities using a RGB multiplier calculation.
  • PALETTE USING (statement) sets the color intensity settings using a designated array.
  • POINT (function) returns a pixel coordinate color attribute or the LONG _RGB color value of a 32 bit color.
  • PRESET (statement) sets a pixel coordinate to the background color or a color specified.
  • PSET (statement) sets a pixel coordinate a specified color or uses the current color when not designated.
  • SCREEN sets the screen mode of a program which may determine the number of colors available in legacy modes.

(Return to Table of Contents)


Console Window

  • $CONSOLE (metacommand) creates a console window that can be used throughout a program.
  • _CONSOLE (statement) used to turn a console window OFF or ON or to designate _DEST _CONSOLE for output.
  • _CONSOLEINPUT (function) fetches input data from a $CONSOLE window to be read later (both mouse and keyboard)
  • _CINP (function) Returns a key code from $CONSOLE input
  • _CONSOLECURSOR (statement) is used to switch the text cursor in Console Windows off/on or change its size.
  • _CONSOLEFONT (statement) is used to change the text font used in Console Windows or change its size.
  • _CONSOLETITLE (statement) creates the title of the console window using a literal or variable string.
  • $SCREENHIDE (metacommand) hides the program window throughout the program until $SCREENSHOW is used.
  • _SCREENHIDE hides the main program window in a section of code until _SCREENSHOW is used.
  • $SCREENSHOW (metacommand) displays the main program window throughout the program after $SCREENHIDE has been used.
  • _SCREENSHOW displays the main program window in a section of code after _SCREENHIDE has been used.
  • SHELL (function) executes a DOS command or calls another program. Returns codes sent by END or SYSTEM.
  • _SHELLHIDE (function) hides a DOS command or call to another program. Returns codes sent by END or SYSTEM.


(Return to Table of Contents)


Conditional Operations

  • AND (boolean) returns True if all of the arguments are True.
  • _ANDALSO (boolean) performs short-circuiting logical conjunction on two expressions.
  • NOT (boolean) returns the opposite condition of an argument.
  • OR (boolean) returns True if one of the arguments is True.
  • _ORELSE (boolean) performs short-circuiting inclusive logical disjunction on two expressions.
  • XOR (boolean) returns True if only one of two arguments are True.
  • _NEGATE (boolean) returns True when a boolean evaluation is False and vice-versa.


See also: Logical Operations and Relational Operations


(Return to Table of Contents)


Definitions and Variable Types

  • _BIT {` numerical type) values of 0 (bit off) or -1 (bit on). Unsigned of 0 or 1.
  • _BYTE {%% numerical type) values from -128 to 127 (one byte or 8 _BITs). Unsigned from 0 to 255.
  • _DEFINE (statement) defines a range of untyped variable names according to their first character as a datatype.
  • _FLOAT {## numerical type) values offer the maximum floating-point decimal precision available using QB64.
  • _INTEGER64 (&& numerical type) values -9223372036854775808 to 9223372036854775807. Unsigned to 18446744073709551615.
  • _MEM (variable type) contains read only dot elements for the OFFSET, SIZE, TYPE and ELEMENTSIZE of a block of memory.
  • _OFFSET(%& variable type) can store any memory offset integer value when using DECLARE LIBRARY or _MEMory only.
  • _UNSIGNED {~ numerical type) defines an integer numerical value as being positive only in QB64.
  • COMMON (statement) shares common variable values with other Linked or CHAINed programs.
  • COMMON SHARED (statement) shares common variable values with all sub-procedures and other Linked or CHAINed programs.
  • CONST (statement) defines one or more named numeric or string shared values which can not change in a program.
  • DEFDBL (statement) defines undefined variable starting letters AS DOUBLE variables instead of the SINGLE type default.
  • DEFINT (statement) defines undefined variable starting letters AS INTEGER variables instead of the SINGLE type default.
  • DEFLNG (statement) defines undefined variable starting letters AS LONG variables instead of the SINGLE type default.}}
  • DEFSNG (statement) defines undefined variable starting letters AS SINGLE variables instead of the SINGLE type default.
  • DEFSTR (statement) defines undefined variable starting letters AS STRING variables instead of the SINGLE type default.
  • DIM defines a variable or size a static array and can define the type of value it returns.
  • DOUBLE {# numerical type) an 8 byte floating decimal variable type with numerical values up to 15 decimal places.
  • INTEGER {% numerical type) a two byte variable type with values from -32768 to 32767. Unsigned to 65535.
  • LONG {& numerical type) Integer values can be from -2147483648 to 2147483647. _UNSIGNED values to 4294967295.
  • OPTION BASE (statement) sets the default starting index of an array to 0 or 1.
  • REDIM defines and sizes a dynamic(changeable) array and can define the type of value returned.
  • SHARED (statement) designates variable values that can be shared with sub-procedures without using SUB parameters.
  • SINGLE (! numerical type) a 4 byte floating decimal variable type with numerical values up to 7 decimal places.
  • STATIC (statement) defines a variable or list of variables that will retain their values after the sub-procedure is exited.
  • STRING ($ variable type) one byte text variable with ASCII code values from 0 to 255.
  • TYPE (statement) defines variable types that can hold more than one variable type value of a fixed byte length.


See also: QB64 Variable Types and C++ Variable Types

(Return to Table of Contents)


External Disk and API calls

  • _ACCEPTFILEDROP (statement) turns a program window into a valid drop destination for dragging files from Windows Explorer.
  • _DEVICE$ (function) returns a STRING expression listing device names and input types of system input devices.
  • _DEVICES (function) returns the number of input devices found on a computer system.
  • _DIREXISTS (function) returns -1 if the directory folder name string parameter exists. Zero if it does not.
  • _DROPPEDFILE (function) returns the list of items (files or folders) dropped in a program's window after _ACCEPTFILEDROP is enabled.
  • _CLIPBOARD$ (statement) sends STRING data to the Clipboard.
  • _CLIPBOARD$ (function) returns the current contents of the Clipboard as a string.
  • _CLIPBOARDIMAGE (function) pastes an image from the clipboard into a new QB64 image in memory.
  • _CLIPBOARDIMAGE (statement) copies a valid QB64 image to the clipboard.
  • _CWD$ (function) returns the current working directory path as a STRING.
  • _DONTWAIT (SHELL action) allows the program to continue without waiting for the other program to close.
  • _FILEEXISTS (function) returns -1 if the file name string parameter exists. Zero if it does not.
  • _FINISHDROP (statement) resets _TOTALDROPPEDFILES and clears the _DROPPEDFILE list of items (files/folders).
  • _HIDE (SHELL action) hides the DOS screen output during a shell.
  • _LASTBUTTON (function) returns the number of buttons available on a specified number device listed by DEVICE$.
  • _OPENFILEDIALOG$ (function) Displays a standard dialog box that prompts the user to open a file.
  • _OS$ (function) returns the QB64 compiler version in which the program was compiled as [WINDOWS], [LINUX] or [MACOSX] and [32BIT] or [64BIT].
  • _SAVEFILEDIALOG$ (function) Displays a standard dialog box that prompts the user to save a file.
  • _SCREENCLICK simulates clicking the mouse at a position on the screen to get focus.
  • _SCREENIMAGE captures the current desktop screen image.
  • _SCREENPRINT simulates keyboard entries on the desktop.
  • _SELECTFOLDERDIALOG$ (function) Displays a dialog box that enables the user to select a folder (directory).
  • _SHELLHIDE (function) executes a DOS command or calls another program. Returns codes sent by END or SYSTEM.
  • _STARTDIR$ (function) returns the user's program calling path as a STRING.
  • _TOTALDROPPEDFILES (function) returns the number of items (files or folders) dropped in a program's window after _ACCEPTFILEDROP is enabled.


  • CHDIR (statement) changes the program path to a new path.
  • COMMAND$ (function) returns command line parameters sent when a program is started.
  • ENVIRON (statement) temporarily sets an environmental key/pair value.
  • ENVIRON$ (function) returns the environmental settings of the computer.
  • _ENVIRONCOUNT (function) returns the number of key/value pairs currently exist in the environment table.
  • _FILES$ (function) returns a file or directory name that matches the specified pattern.
  • FILES (statement) displays a specified list of files.
  • _FULLPATH$ (function) returns an absolute or full path name for the specified relative path name.
  • MKDIR (statement) creates a new directory folder in the designated path.
  • NAME (statement) renames a file.
  • RMDIR (statement) removes an empty directory folder from the specified path.
  • SHELL (statement) performs a command line operation in DOS.
  • SHELL (function) executes a DOS command or calls another program. Returns codes sent by END or SYSTEM.


(Return to Table of Contents)


Error Trapping

  • _ASSERT (statement) Performs debug tests.
  • $ASSERTS (metacommand) Enables the _ASSERT macro
  • $CHECKING (metacommand) turns off or on error event checking and strips error code from compiled programs.
  • _ERRORLINE (function) returns the actual text code line where a program error occurred.
  • ERR (function) returns the error code number of the last error to occur.
  • ERROR (statement) simulates a program error based on the error code number used.
  • ERL (function) returns the closest line number before an error occurred if the program uses them.
  • ON ERROR (statement) GOTO sends the program to a line number or label when an error occurs. Use to avoid program errors.
  • RESUME (statement) error statement sends the program to the NEXT code line or a designated line number or label .


(Return to Table of Contents)


Event Trapping

  • _AUTODISPLAY (statement) enables the automatic display of the screen image changes previously disabled by _DISPLAY.
  • _DELAY (statement) suspends program execution for a SINGLE value of seconds down to milliseconds.
  • _DISPLAY (statement) turns off automatic display while only displaying the screen changes when called.
  • _EXIT (function) prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.
  • _FREETIMER (function) returns a free TIMER number for multiple ON TIMER(n) events.
  • _MOUSEINPUT (function) reports any changes to the mouse status and MUST be used to read those changes.
  • _SHELLHIDE (function) returns the code sent by a program exit using END or SYSTEM followed by an INTEGER value.


  • OFF turns event checking off and does not remember subsequent events.
  • ON turns event checking on.
  • ON ERROR GOTO (event statement) executes when a program error occurs
  • ON KEY(n) (event statement) executes when a keypress or keypress combination occurs.
  • ON TIMER(n) (event statement) executes when a timed event occurs. QB64 can use multiple numbered timers.
  • ON...GOSUB (event statement) branches to a line number or label according to a numerical ordered list of labels.
  • ON...GOTO (event statement) branches to a line number or label according to a numerical ordered list of labels.
  • STOP suspends event checking and remembers subsequent events that are executed when events are turned back on.
  • TIMER (function) returns the number of seconds past the previous midnite down to a QB64 accuracy of one millisecond.
  • TIMER (statement) enables, turns off or stops timer event trapping. In QB64 TIMER(n) FREE can free multiple timers.
  • WAIT (statement) normally used to delay program display execution during or after vertical retrace periods.

(Return to Table of Contents)


File Input and Output

  • _DIREXISTS (function) returns -1 if the directory folder name string parameter exists. Zero if it does not.
  • _FILEEXISTS (function) returns -1 if the file name string parameter exists. Zero if it does not.
  • _READFILE$ (function) directly read a file into a string, without OPEN/CLOSE overhead.
  • _WRITEFILE (statement) directly write a string into a file, without OPEN/CLOSE overhead.
  • ACCESS (clause) used in a networking OPEN statement to allow READ or WRITE access to files.
  • APPEND (file mode) opens or creates a file that can be appended with data at the end.
  • BINARY (file mode) opens or creates a file that can be byte accessed using both GET and PUT.
  • BLOAD (statement) opens a binary file and loads the contents to a specific array.
  • BSAVE (statement) creates a binary file that holds the contents of a specified array.
  • CHDIR (statement) changes the program path to a new path.
  • CLOSE (statement) closes a specified file or all open files.
  • EOF (function) returns -1 when the end of a file has been read.
  • FIELD (statement) creates a STRING type definition for a random-access file buffer.
  • FILES (statement) displays a specified list of files.
  • FREEFILE (function) returns a file access number that is currently not in use.
  • GET (file I/O statement) reads file data by byte or record positions.
  • INPUT (file mode) only OPENs existing sequential files for program INPUT.
  • INPUT (file statement) reads sequential file data that was created using PRINT # or WRITE #.
  • INPUT$ (function) reads a specific number of bytes from random or binary files.
  • KILL (statement) deletes a specified file without asking for verification. Remove empty folders with RMDIR.
  • LINE INPUT (file statement) reads an entire text row of printed sequential file data.
  • LOC (function) finds the current file location or size of a COM port receive buffer.
  • LOCK (statement) prevents access to a file.
  • LOF (function) returns the size of a file in bytes.
  • MKDIR (statement) creates a new folder in the designated path.
  • NAME (statement) renames a file AS a new file name.
  • OPEN (file I/O statement) opens a specified file FOR an access mode with a set reference number.
  • OUTPUT (file mode) opens or creates a new file that holds no data.
  • PRINT (file statement) writes text and numerical data into a file.
  • PRINT USING (file statement) writes template formatted text into a file.
  • PUT (file I/O statement) writes data into a RANDOM or BINARY file by byte or record position.
  • RANDOM (file mode) opens or creates a file that can be accessed using both GET and PUT.
  • RESET (statement) closes all files and writes the directory information to a diskette.
  • RMDIR (statement) removes an empty folder from the specified path.
  • SEEK (function) returns the current read or write byte position in a file.
  • SEEK (statement) sets the current read or write byte position in a file.
  • UNLOCK (statement) unlocks access to a file.
  • WIDTH (statement) sets the text width of a file.
  • WRITE (file statement) writes numerical and string data to a sequential file using comma separators.

(Return to Table of Contents)


Checksums and Hashes

  • _ADLER32 (function) Returns the Adler-32 checksum of any arbitrary string.
  • _CRC32 (function) Returns the Crc-32 checksum of any arbitrary string.
  • _MD5$ (function) Returns the MD5 hash value of any arbitrary string.

(Return to Table of Contents)


Fonts

  • _KEEPBACKGROUND (1): Text background transparent. Only the text is displayed over anything behind it.
  • _ONLYBACKGROUND (2): Text background is only displayed. Text is transparent to anything behind it.
  • _FILLBACKGROUND (3): Text and background block anything behind them like a normal PRINT. Default setting.
  • _PRINTSTRING (statement) prints text or custom font strings using graphic column and row coordinate positions.
  • _PRINTWIDTH (function) returns the width in pixels of the _FONT or text string that a program will print.
  • PRINT (statement) prints numeric or string expressions to the program screen.
  • PRINT USING (statement) prints template formatted numeric or string values to the program screen.
  • _UCHARPOS (function) calculates the starting pixel positions of every character of a (unicode) text string.
  • _UFONTHEIGHT (function) returns the global glyph height (incl. ascender/descender) of a loaded font.
  • _ULINESPACING (function) returns the vertical line spacing (distance between two consecutive baselines) in pixels.
  • _UPRINTSTRING (statement) locates and prints a (unicode) text string using graphic coordinates.
  • _UPRINTWIDTH (function) returns the pixel width of a (unicode) text string to be printed using _UPRINTSTRING.
  • WRITE (screen I/O statement) writes a comma-separated list of values to the screen.


(Return to Table of Contents)


Game Controller Input (Joystick)

  • _AXIS (function) returns a SINGLE value between -1 and 1 indicating the maximum distance from device axis center 0.
  • _BUTTON (function) returns -1 when a device button is pressed and 0 when button is released.
  • _BUTTONCHANGE (function) returns -1 when a device button has been pressed and 1 when released. Zero indicates no change.
  • _DEVICE$ (function) returns a STRING expression listing a designated numbered input device name and types of input.
  • _DEVICEINPUT (function) returns the _DEVICES number of an _AXIS, _BUTTON or _WHEEL event.
  • _DEVICES (function) returns the number of input devices found on a computer system including the keyboard and mouse.
  • _LASTAXIS (function) returns the number of axis available on a specified number device listed by _DEVICE$.
  • _LASTBUTTON (function) returns the number of buttons available on a specified number device listed by DEVICE$.
  • _LASTWHEEL (function) returns the number of scroll wheels available on a specified number device listed by _DEVICE$.
  • _MOUSEMOVEMENTX (function) returns the relative horizontal position of the mouse cursor compared to the previous position.
  • _MOUSEMOVEMENTY (function) returns the relative vertical position of the mouse cursor compared to the previous position.
  • _WHEEL (function) returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.
  • ON STRIG(n) (event statement) directs program flow upon a button press event of a game controller device.
  • STICK (function) returns the directional axis coordinate values from 1 to 254 of game port (&H201) or USB controller devices.
  • STRIG (function) returns the True or False button press status of game port (&H201) or USB controller devices.
  • STRIG(n) (statement) enables, suspends or disables event trapping of STRIG button return values.


(Return to Table of Contents)


Graphic Commands

  • _COPYIMAGE (function) can copy a software surface to a hardware accelerated surface handle using mode 33.
  • _DISPLAY (statement) renders surfaces visible in the _DISPLAYORDER previously set in the QB64 program.
  • _DISPLAYORDER sets the rendering order of _SOFTWARE, _HARDWARE and _GLRENDER with _DISPLAY.
  • _LOADIMAGE (function) can load images as hardware accelerated using mode 33.
  • _PUTIMAGE (statement) can place GL surfaces and allows the _SMOOTH action to blend stretched surfaces.

(Return to Table of Contents)


Graphics and Imaging:

  • _AUTODISPLAY (statement) enables the automatic display of the screen image changes previously disabled by _DISPLAY.
  • _CLIP (PUT action) allows placement of an image partially off of the screen.
  • _COPYIMAGE (function) function duplicates an image handle from a designated handle.
  • _COPYPALETTE (statement) copies the color palette intensities from one image to another image or screen page.
  • _DESKTOPHEIGHT (function) returns the height of the desktop (not program window).
  • _DESKTOPWIDTH (function) returns the width of the desktop (not program window).
  • _DEST (statement) sets the current write image or page. All graphics will go to this image.
  • _DEST (function) returns the current write destination image or page.
  • _DISPLAY (statement) turns off automatic display while only displaying the screen changes when called.
  • _DISPLAY (function) returns the handle of the current image that is displayed on the screen.
  • _FULLSCREEN (function) returns the present full screen mode setting of the screen window.
  • _FULLSCREEN (statement) sets the full screen mode of the screen window. Alt + Enter can do it manually.
  • _FREEIMAGE (statement) releases an image handle value from memory when no longer needed.
  • _HEIGHT (function) returns the height of an image handle or current write page.
  • _ICON (function) places an image in the title bar using a _LOADIMAGE handle.
  • _LOADIMAGE (function) loads a graphic file image into memory and returns an image handle.
  • _MAPTRIANGLE (statement) maps a triangular portion of an image to a destination image or screen page.
  • _NEWIMAGE (function) prepares a window image or page surface and returns the handle value.
  • _PIXELSIZE (function) returns the color depth (Bits Per Pixel) of an image.
  • _PRINTSTRING (statement) prints text or custom font strings using graphic column and row coordinate positions.
  • _PUTIMAGE (statement) maps a rectangular area of a source image to an area of a destination image in one operation
  • _SAVEIMAGE (statement) Saves the screen or an image handle to an image file.
  • _SCREENIMAGE (function) creates an image of the current desktop and returns an image handle.
  • _SMOOTH (function) checks whether the current _FULLSCREEN mode has antialiasing enabled or not.
  • _SOURCE (statement) establishes the image SOURCE using a designated image handle
  • _SOURCE (function) returns the present image _SOURCE handle value.
  • _UCHARPOS (function) calculates the starting pixel positions of every character of a (unicode) text string.
  • _UPRINTSTRING (statement) locates and prints a (unicode) text string using graphic coordinates.
  • _WIDTH (function) returns the width of an image handle or current write page.


  • CIRCLE (statement) is used in graphics SCREEN modes to create circles, arcs or ellipses.
  • CLS (statement) clears a screen page or the program SCREEN. QB64 can clear with a color.
  • COLOR (statement) sets the current text color attribute or _RGB value to be used or background colors in some screen modes.
  • DRAW (statement) uses a special type of string expression to draw lines on the screen.
  • GET (graphics statement) used to store a box area image of the screen into an INTEGER array.
  • LINE (statement) used in graphic SCREEN modes to create lines or boxes.
  • PAINT (statement) used to color enclosed graphic objects with a designated fill color and border color.
  • PALETTE (statement) can swap color settings, set colors to default or set the Red, Green, Blue color palette.
  • PALETTE USING (statement) sets all RGB screen color intensities using values from an array.
  • PCOPY (statement) copies one source screen page to a destination page in memory.
  • PMAP (function) returns the physical or WINDOW view coordinates.
  • POINT (function) returns the pixel COLOR attribute or _RGB value at a specified graphics coordinate.
  • PRESET (statement) sets a pixel coordinate to the background color or a designated color.
  • PSET (statement) sets a pixel coordinate to the default color or designated color attribute.
  • PUT (graphics statement) statement is used to place GET saved or BSAVEd images stored in an array.
  • SCREEN sets the screen mode of a program. No statement defaults the program to SCREEN 0 text only mode.
  • STEP (relational statement) is used to step through FOR loop values or use relative graphical coordinates.
  • VIEW (graphics statement) creates a graphics view port area by defining the coordinate limits to be viewed.
  • WINDOW (statement) defines the coordinate dimensions of the current graphics viewport.


See also: Bitmaps, Icons and Cursors, SaveImage SUB, GIF Images

(Return to Table of Contents)


Keyboard Input

  • _CONTROLCHR (statement) OFF allows the control characters to be used as text characters. ON(default) can use them as commands.
  • _CONTROLCHR (function) returns the current state of _CONTROLCHR as 1 when OFF and 0 when ON.
  • _EXIT (function) prevents a program user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.
  • _INPUTBOX$ (function) Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box.
  • _KEYDOWN (function) returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.
  • _KEYHIT (function) returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.
  • _SCREENPRINT (statement) simulates typing text into another OS program using the keyboard.


  • INKEY$ (function) returns the ASCII string character of a keypress.
  • INPUT (statement) requests a STRING or numerical keyboard entry from a program user.
  • INPUT$ (function) used to get a set number of keypress characters or bytes from a file.
  • INP (function) returns a scan code value from keyboard register &H60(96) to determine key presses.
  • KEY n (event statement) is used to assign a "softkey" string to a key and/or display them.
  • KEY(n) (event statement) assigns, enables, disables or suspends event trapping of a keypress.
  • KEY LIST (statement) lists the 12 Function key soft key string assignments going down left side of screen.
  • LINE INPUT (statement) requests a STRING keyboard entry from a program user.
  • ON KEY(n) (event statement) defines a line number or label to go to when a specified key is pressed.
  • SLEEP (statement) pauses the program for a specified number of seconds or a until a key press.


See also: Keyboard scancodes, ASCII Codes references or Hot Keys for Windows.


(Return to Table of Contents)


Libraries


  • ALIAS (statement) tells the program that you will use a different name than the name used in the Library file.
  • BYVAL (statement) used to pass a parameter's value with sub-procedures from a Library.
  • DECLARE LIBRARY allows the use of OS specific, SDL or C++ external library SUB and FUNCTION procedures
  • END DECLARE required at the END of the block of Library declarations in QB64.


QB64 also supports $INCLUDE text code file Libraries. QB64 does not support QLB Libraries or OBJ files.
  • $INCLUDEONCE (metacommand) prevents that include file contents is injected multiple times into a program.


See also: C++ Variable Types


(Return to Table of Contents)


Logical Bitwise Operations

  • AND (operator) the bit is set when both bits are set.
  • EQV (operator) the bit is set when both are set or both are not set.
  • IMP (operator) the bit is set when both are set or both are unset or the second condition bit is set.
  • OR (operator) the bit is set when either bit is set.
  • NOT (operator) the bit is set when a bit is not set and not set when a bit is set.
  • XOR (operator) the bit is set when just one of the bits are set.


(Return to Table of Contents)


Mathematical Functions and Operations

  • _MAX (function) Returns the greater of two given numeric values.
  • _MIN (function) Returns the lesser of two given numeric values.
  • _ROUND (function) rounds to the closest EVEN INTEGER, LONG or _INTEGER64 numerical value.



  • ABS (function) returns the the positive value of a variable or literal numerical value.
  • ATN (function) or arctangent returns the angle in radians of a numerical tangent value.
  • CDBL (function) closest double rounding function
  • CINT (function) closest integer rounding function
  • CLNG (function) closest long integer rounding function
  • COS (function) cosine of a radian angle
  • CSNG (function) closest single rounding function
  • EXP (function) returns the value of e to the power of the parameter used.
  • FIX (function) rounds positive or negative values to integer values closer to 0
  • INT (function) rounds to lower integer value
  • LOG (function) natural logarithm of a specified numerical value.
  • SIN (function) sine of a radian angle.
  • SQR (function) square root of a positive number.
  • TAN (function) returns the ratio of SINe to COSine or tangent value of an angle measured in radians.


See also: Mathematical Operations and Logical Operations

(Return to Table of Contents)


Memory Handling and Clipboard

  • _CLIPBOARD$ (function) returns the current STRING contents of the system Clipboard.
  • _CLIPBOARD$ (statement) sets and overwrites the STRING contents of the current system Clipboard.
  • _MEM (function) returns _MEM block referring to the largest continuous memory region beginning at a designated variable's offset.
  • _MEM (variable type) contains read only dot elements for the OFFSET, SIZE, TYPE and ELEMENTSIZE of a block of memory.
  • _MEMCOPY (statement) copies a value from a designated OFFSET and SIZE TO a block of memory at a designated OFFSET.
  • _MEMELEMENT (function) returns a _MEM block referring to a variable's memory (but not past it).
  • _MEMEXISTS (function) verifies that a memory block exists for a memory variable name or returns zero.
  • _MEMFILL (statement) fills a designated memory block OFFSET with a certain SIZE and TYPE of value.
  • _MEMFREE (statement) frees a designated memory block in a program. Only free memory once!
  • _MEMGET (statement) reads a designated value from a designated memory OFFSET
  • _MEMGET (function) returns a value from a designated memory block and OFFSET using a designated variable TYPE.
  • _MEMIMAGE (function) returns a _MEM block referring to a designated image handle's memory
  • _MEMNEW (function) allocates new memory with a designated SIZE and returns a _MEM block referring to it.
  • _MEMPUT (statement) places a designated value into a designated memory _OFFSET
  • _MEMSOUND (function) returns a _MEM block referring to a designated sound handle's memory
  • _OFFSET (function) returns the memory offset of a variable when used with DECLARE LIBRARY or _MEM only.
  • _OFFSET(%& numerical type) can be used store the value of an offset in memory when using DECLARE LIBRARY or _MEM only.


Functions and statements using QB64's emulated 16 bit memory
  • DEF SEG (statement) defines the segment address in memory.
  • PEEK (function) returns the value that is contained at a certain memory address offset.
  • POKE (statement) sets the value of a specified memory address offset.
  • SADD (function) returns the address of a STRING variable as an offset from the current data segment.
  • VARPTR (function) returns an INTEGER value that is the offset pointer of the memory address within it's segment.
  • VARPTR$ (function) returns a STRING representation of a variable's memory address value
  • VARSEG (function) returns an INTEGER value that is the segment part of a variable or array memory address.
See also: Screen Memory or Using _OFFSET

(Return to Table of Contents)


Mouse Input

  • _AXIS (function) returns a SINGLE value between -1 and 1 indicating the maximum distances from device center 0.
  • _BUTTON (function) returns -1 when a device button is pressed and 0 when button is released. 2 is the mouse center or scroll button
  • _BUTTONCHANGE (function) returns -1 when a device button has been pressed and 1 when released. Zero indicates no change.
  • _DEVICE$ (function) returns a STRING expression listing device names and input types of system input devices.
  • _DEVICEINPUT (function) returns the _DEVICES number of an _AXIS, _BUTTON or _WHEEL event. Mouse is normally _DEVICEINPUT(2).
  • _DEVICES (function) returns the number of input devices found on a computer system. The mouse is normally device 2.
  • _EXIT (function) prevents a program user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.
  • _LASTAXIS (function) returns the number of axis available on a specified number device listed by _DEVICE$.
  • _LASTBUTTON (function) returns the number of buttons available on a specified number device listed by DEVICE$.
  • _LASTWHEEL (function) returns the number of scroll wheels available on a specified number device listed by _DEVICE$.
  • _MOUSEBUTTON (function) returns whether a specified mouse button number has been clicked. 3 is the mouse center or scroll button
  • _MOUSEHIDDEN (function) returns the current state of the mouse pointer.
  • _MOUSEHIDE (statement) hides the OS mouse pointer from view.
  • _MOUSEINPUT (function) must be used to monitor and read all changes in the mouse status.
  • _MOUSEMOVE (statement) moves the mouse cursor pointer to a designated coordinate.
  • _MOUSEMOVEMENTX (function) returns the relative horizontal position of the mouse cursor.
  • _MOUSEMOVEMENTY (function) returns the relative vertical position of the mouse cursor.
  • _MOUSESHOW (statement) displays the OS mouse cursor after it has been hidden.
  • _MOUSEWHEEL (function) returns a positive or negative count the mouse scroll wheel clicks since the last read.
  • _MOUSEX (function) indicates the current horizontal position of the mouse pointer.
  • _MOUSEY (function) indicates the current vertical position of the mouse pointer.
  • _SCREENCLICK simulates clicking the mouse at a position on the screen to get focus.
  • _WHEEL (function) returns -1 when a device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.


  • CALL ABSOLUTE (statement) used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented.
  • INTERRUPT (statement) used to access Interrupt vector &H33 to work with the mouse. Functions 0 to 3 implemented.


(Return to Table of Contents)


Numerical Manipulation and Conversion

  • _BIN$ (function) converts the INTEGER part of any value to binary STRING number value.
  • _CV (function) used to convert _MK$ ASCII string values to specified numerical value types.
  • _MK$ (function) converts a specified numerical type into an ASCII string value that must be converted back using _CV.
  • _PRESERVE (REDIM action) preserves the current contents of an array, when re-dimensioning it.
  • _TOSTR$ (function) Returns the STRING representation of a numerical value. It's a successor of the legacy STR$ function.
  • _UNSIGNED {numerical type) defines a numerical value as being positive only using QB64.


  • ABS (function) returns the the positive value of a variable or literal numerical value.
  • ASC (function) returns the ASCII code number of a certain STRING text character or a keyboard press.
  • CDBL (function) converts a numerical value to the closest DOUBLE-precision value.
  • CHR$ (function) returns the character associated with a certain ASCII character code as a STRING.
  • CINT (function) returns the closest INTEGER value of a number.
  • CLEAR (statement) clears all variable values to 0 or null strings and closes all open files.
  • CLNG (function) rounds decimal point numbers up or down to the nearest LONG integer value.
  • CSNG (function) converts a numerical value to the closest SINGLE-precision number.
  • CVD (function) converts STRING values to DOUBLE numerical values.
  • CVDMBF (function) converts a 8-byte Microsoft Binary format string value to a DOUBLE precision number.
  • CVI (function) converts 2 byte STRING values to INTEGER numerical values.
  • CVL (function) converts 4 byte STRING values to LONG numerical values.
  • CVS (function) converts 4 byte STRING values to SINGLE numerical values.
  • CVSMBF (function) converts a 4-byte Microsoft Binary format string value to a SINGLE-precision number.
  • DIM (statement) used to declare a variable type or dimension a STATIC array.
  • ERASE (array statement) clears a STATIC array of all values and totally removes a $DYNAMIC array.
  • HEX$ (function) converts the INTEGER part of any value to hexadecimal STRING number value.
  • INT (function) rounds a numeric value down to the next whole number or INTEGER value.
  • LEN (function) returns the byte size of strings or numerical variables.
  • OCT$ (function) converts the INTEGER part of any value to octal STRING number value.
  • RANDOMIZE (statement) seeds the RND random number generation sequence.
  • REDIM (statement) re-dimensions the number of elements in a dynamic(resizeable) array.
  • RND (function) returns a randomly generated number from 0 to .9999999
  • SGN (function) returns the sign as -1 for negative, zero for 0 and 1 for positive numerical values.
  • STR$ (function) converts a numerical value to a STRING value.
  • SWAP (statement) trades the values of two numerical types or strings.
  • VAL (function) converts number strings into numerical values until it runs into a non-numeric character.


(Return to Table of Contents)


Port Input and Output (COM and LPT)

  • GET (file I/O statement) reads port data data by byte or record positions.
  • LOC (function) finds the current file location or size of a COM port receive buffer.


  • OPEN COM (statement) opens a computer serial COMmunications port.
  • OUT (statement) sends values to register or port hardware addresses (emulated - limited access).



See Port Access Libraries for other ways to access COM and LPT ports..


(Return to Table of Contents)


Print formatting


(Return to Table of Contents)


Printer Output (LPT and USB)

  • _PRINTIMAGE (statement) prints an image stretched to the size of the paper setting of an LPT or USB printer.


  • LPOS (function) returns the current parallel(LPT) printer head position.
  • LPRINT (statement) prints text to an LPT or USB printer page.
  • LPRINT USING (statement) prints template formatted STRING text to an LPT or USB printer page.


QB64 will use the default system printer selected. _PRINTIMAGE images will be stretched to the paper size setting.


(Return to Table of Contents)


Program Flow and Loops

  • _CONTINUE (statement) skips the remaining lines in a control block (DO/LOOP, FOR/NEXT or WHILE/WEND)
  • _DEST (statement) sets the current write image or page. All graphics will go to this image.
  • _DEST (function) returns the current write destination image or page.
  • _EXIT (function) prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.
  • _SOURCE (statement) establishes the image SOURCE using a designated image handle
  • _SOURCE (function) returns the present image _SOURCE handle value.
  • _SHELLHIDE (function) returns the code sent by a program exit using END or SYSTEM followed by an INTEGER value.


  • CALL (statement) sends code execution to a subroutine procedure in a program.
  • CASE (SELECT CASE statement) used within a SELECT CASE block to specify a conditional value of the compared variable.
  • CASE ELSE (SELECT CASE statement) used in a SELECT CASE block to specify an alternative to other CASE values.
  • CASE IS (SELECT CASE statement) used within a SELECT CASE block to specify a conditional value of the compared variable.
  • DO...LOOP (loop statement) used in programs to repeat code or return to the start of a procedure.
  • ELSE (statement) used in IF...THEN statements to offer an alternative to other conditional statements.
  • ELSEIF (statement) used in IF...THEN block statements to offer an alternative conditional statement.
  • END (statement) ENDs a conditional block statement, a sub-procedure or ends the program with "Press any key..."
  • END IF (IF statement end) ENDs an IF statement block.
  • ERROR (error statement) used to simulate an error in a program.
  • EXIT (statement) exits a loop, function or sub-procedure early.
  • FOR...NEXT (statement) a counter loop procedure that repeats code a specified number of times.
  • GOSUB (statement) send the program to a designated line label procedure in the main module or a SUB procedure.
  • GOTO (statement) sends the program to a designated line number or label.
  • IF...THEN (statement) a conditional flow statement or block of statements.
  • LOOP end of a DO...LOOP procedure that repeats code until or while a condition is true.
  • RESUME (error statement) an error statement that can return the program to the NEXT code line or a specific line number.
  • RETURN (statement) a sub-procedure statement that returns the program to the code immediately after the procedure call.
  • RUN (statement) clears and restarts the program currently in memory or executes another specified program.
  • SELECT CASE (statement) determines the program flow by comparing the value of a variable to specific values.
  • SHELL (DOS statement) directly accesses the Operating System's command line procedures.
  • SLEEP (statement) stops program progression for a specific number of seconds or until a keypress is made.
  • STEP (relational statement) is used to step through FOR loop values or use relative graphical coordinates.
  • STOP (statement) is used when troubleshooting a program to stop the program at a specified code line.
  • SYSTEM (statement) immediately exits a program and closes the program window.
  • UNTIL (conditional statement) continues a DO LOOP procedure until a condition is true.
  • WHILE (statement) continues a DO LOOP procedure while a condition is true.
  • WHILE...WEND (statement) a loop procedure that repeats code while a condition is true.

(Return to Table of Contents)


Sounds and Music

  • _MIDISOUNDBANK enables _SNDOPEN to use external FM Banks or SoundFonts when playing MIDI files.
  • $MIDISOUNDFONT (metacommand) (deprecated) enables the MIDI support for _SNDOPEN.
  • _SNDBAL (statement) sets the balance or 3D position of a sound.
  • _SNDCLOSE (statement) frees and unloads an open sound using a _SNDOPEN or _SNDCOPY handle.
  • _SNDCOPY (function) copies a sound to a new handle so that two or more of the same sound can be played at once.
  • _SNDGETPOS (function) returns the current playing position in seconds of a designated sound handle.
  • _SNDLEN (function) returns the length of a sound in seconds of a designated sound handle.
  • _SNDLIMIT (statement) stops playing a sound after it has been playing for a set number of seconds.
  • _SNDLOOP (statement) loops the playing of a specified sound handle.
  • _SNDNEW (function) creates a raw empty sound in memory and returns a LONG handle value for later access.
  • _SNDOPEN (function) loads a sound file with certain capabilities and returns a handle value.
  • _SNDPAUSE (statement) pauses a specified sound handle if it is playing.
  • _SNDPAUSED (function) returns the pause status of a specified sound handle.
  • _SNDPLAY (statement) plays a designated sound file handle.
  • _SNDPLAYCOPY (statement) copies a sound, plays it and automatically closes the copy using a handle parameter
  • _SNDPLAYFILE (statement) a simple command to play a sound file with limited options.
  • _SNDPLAYING (function) returns whether a sound handle is being played.
  • _SNDRATE (function) returns the sample rate frequency per second of the current computer's sound card.
  • _SNDRAW (statement) plays sound wave sample frequencies created by a program.
  • _SNDRAWDONE (statement) pads a _SNDRAW stream so the final (partially filled) buffer section is played.
  • _SNDRAWLEN (function) returns the length, in seconds, of a _SNDRAW sound currently queued.
  • _SNDOPENRAW (function) returns a handle to a new, separate _SNDRAW audio stream.
  • _SNDSETPOS (statement) changes the current/starting playing position of a sound in seconds.
  • _SNDSTOP (statement) stops a playing or paused sound handle.
  • _SNDVOL (statement) sets the volume of a sound handle being played.
  • _WAVE (statement) defines the waveform shape for a specified audio channel when used with SOUND or PLAY.


  • BEEP (statement) makes a beep sound when called or CHR$(7) is printed.
  • PLAY (music statement) uses a custom string statement to play musical notes.
  • SOUND (statement) creates sounds of a specified frequency for a set duration.

(Return to Table of Contents)


String Text Manipulation and Conversion

  • _CLIPBOARD$ (function) returns the current STRING contents of the system Clipboard.
  • _CLIPBOARD$ (statement) sets the STRING contents of the current system Clipboard.
  • _CONTROLCHR (statement) OFF allows the control characters to be used as text characters. ON(default) can use them as commands.
  • _CONTROLCHR (function) returns the current state of _CONTROLCHR as 1 when OFF and 0 when ON.
  • _CV (function) used to convert _MK$ ASCII string values to numerical values.
  • _MK$ (function) converts any numerical type into an ASCII string value that must be converted back using _CV.
  • _STRCMP (function) compares the relationship between two strings.
  • _STRICMP (function) compares the relationship between two strings, without regard for case-sensitivity.
  • _TOSTR$ (function) Returns the STRING representation of a numerical value. It's a successor of the legacy STR$ function.


  • ASC (statement) allows a QB64 program to change a character at any position of a predefined STRING.
  • HEX$ (function) returns the base 16 hexadecimal representation of an INTEGER value as a STRING.
  • INSTR (function) searches for the first occurance of a search STRING within a string and returns the position.
  • LCASE$ (function) changes the uppercase letters of a STRING to lowercase.
  • LEFT$ (function) returns a part of a STRING from the start a designated number of character places.
  • LEN (function) returns the number of bytes or characters in a STRING value.
  • LSET (statement) left-justifies a fixed length string expression based on the size of the STRING.
  • LTRIM$ (function) returns a string with all leading spaces removed.
  • MID$ (statement) allows a QB64 program to change existing characters of a predefined STRING.
  • MKD$ (function) converts a DOUBLE numerical value into an 8 byte ASCII STRING value.
  • MKDMBF$ (function) converts a double-precision number to a string containing a value in Microsoft Binary format.
  • MKI$ (function) converts a numerical INTEGER value to a 2 byte ASCII string value.
  • MKL$ (function) converts a numerical LONG value to a 4 byte ASCII string value.
  • MKS$ (function) converts a numerical SINGLE value to a 4 byte ASCII string value.
  • MKSMBF$ (function) converts a single-precision number to a string containing a value in Microsoft Binary format.}}
  • OCT$ (function) returns the base 8 Octal representation of an INTEGER value.
  • RIGHT$ (function) returns a set number of characters in a STRING variable starting from the end.
  • RSET (statement) right-justifies a string according to length of the string expression.
  • RTRIM$ (function) returns a string with all of the spaces removed at the right end of a string.
  • SPACE$ (function) returns a STRING consisting of a number of space characters.
  • STR$ (function) converts a numerical value to a STRING.
  • STRING ($ variable type) one byte text variable with ASCII code values from 0 to 255.
  • STRING$ (function) returns a STRING consisting of a single character repeated a set number of times.
  • SWAP (statement) used to exchange two string variable or array element values.
  • UCASE$ (function) returns a string with all letters as uppercase.
  • VAL (function) converts a string number value to a numerical value.


(Return to Table of Contents)


Sub procedures and Functions

QBasic and QB64
  • CALL (statement) sends code execution to a SUB procedure in a program. Parameter brackets are required when used.
  • CALL ABSOLUTE (statement) used to access Interrupts on the computer or execute assembly type procedures.
  • CHAIN (statement) changes seamlessly from one program module to another.
  • DECLARE (BASIC statement) used to tell that a SUB or FUNCTION is created to be used in the program. NOT USED by QB64!
  • END (statement) ends a SUB or FUNCTION procedure.
  • EXIT (statement) exits a SUB or FUNCTION procedure early.
  • FUNCTION (statement) a procedure that holds ONE return value in the function's name which is a variable type.
  • GOSUB (statement) sends the program to a sub program that uses a line number or label.
  • $INCLUDE (metacommand) used to insert a source code text file into your program at the point of the insertion.
  • INTERRUPT (statement) a built in assembly routine for accessing computer information registers.
  • RETURN (statement) used in GOSUB procedures to return to the original call code line.
  • RUN (statement) flow statement that clears and restarts the program currently in memory or executes another specified program.
  • SHARED (statement) defines a variable or list of variables as shared with the main program module.}}
  • SHELL (statement) allows a program to use OS command lines.
  • STATIC (statement) defines a variable or list of variables that will retain their values after the sub-procedure is exited.
  • SUB (statement) procedures are programs within programs that can return multiple calculations.

(Return to Table of Contents)


TCP/IP Networking HTTP(S) and Email

All Statements and Functions Compile in QB64 Only!



  • _OPENCLIENT (function) connects to a Host on the Internet as a Client and returns the Client status handle.
  • _OPENCONNECTION (function) open's a connection from a client that the host has detected and returns a status handle.
  • _OPENHOST (function) opens a Host which listens for new connections and returns a Host status handle.


  • CLOSE (statement) closes an opened internet connection using the handle assigned in an OPEN statement.



See also: Downloading Files


(Return to Table of Contents)


Text on Screen

  • _CONTROLCHR OFF allows ASCII characters 0 to 31 to be used as text characters. ON(default) resets to default usage.
  • _FONT (function) creates a new alphablended font handle from a designated image handle
  • _FONT (statement) sets the current _LOADFONT function font handle to be used by PRINT or _PRINTSTRING.
  • _MAPUNICODE (statement) maps a Unicode value to an ASCII character code value.
  • _PRINTSTRING (statement) prints text or custom font strings using graphic column and row coordinate positions.
  • _SCREENPRINT (statement) simulates typing text into a Windows program using the keyboard.
  • _TOSTR$ (function) Returns the STRING representation of a numerical value. It's a successor of the legacy STR$ function.
  • _UCHARPOS (function) calculates the starting pixel positions of every character of a (unicode) text string.
  • _UPRINTSTRING (statement) locates and prints a (unicode) text string using graphic coordinates.


  • CHR$ (function) returns the text character associated with a certain ASCII character code as a one byte STRING.
  • CLS (statement) clears a screen page or the program SCREEN. QB64 can clear with a color.
  • COLOR (statement) used to change the color of the text and background in some legacy screen modes.
  • CSRLIN (function) returns the current print cursor row position on the screen.
  • INPUT (statement) requests a STRING or numerical keyboard entry from a program user.
  • KEY LIST (statement) vertically lists all the ON KEY(n) softkey strings associated with each function key F1 to F12.
  • LINE INPUT (statement) requests a STRING keyboard entry from a program user.
  • LOCATE (statement) locates the screen text row and column positions for a PRINT or INPUT procedure.
  • POS (function) returns the current print cursor column position.
  • PRINT (statement) prints numeric or string expressions to the program screen.
  • PRINT USING (statement) prints template formatted numeric or string values to the program screen.
  • SCREEN (statement) sets the screen mode of a program. No statement defaults the program to SCREEN 0 text mode.
  • SCREEN (function) returns the ASCII code of a text character or the color attribute at a set text location on the screen.
  • SPACE$ (function) returns a string consisting of a number of space characters.
  • SPC (function) used in PRINT and LPRINT statements to print or output a number of space characters.
  • STR$ (function) returns the STRING representation of a numerical value.
  • STRING$(function) returns a STRING consisting of a single character repeated a set number of times.
  • TAB (function) used in PRINT and LPRINT statements to move to a specified text column position.
  • VIEW PRINT (statement) defines the boundaries of a text viewport PRINT area.
  • WIDTH (statement) changes the text dimensions of certain SCREEN modes or printer page widths
  • WRITE (screen I/O statement) writes a comma-separated list of values to the screen.


See also: Fonts and Unicode or ASCII Code Table

(Return to Table of Contents)


Time, Date and Timing

  • _AUTODISPLAY (statement) enables the automatic display of the screen image changes previously disabled by _DISPLAY.
  • _DELAY (statement) suspends program execution for a SINGLE value of seconds down to milliseconds.
  • _DISPLAY (statement) turns off automatic display while only displaying the screen changes when called.
  • _FREETIMER (function) returns a free TIMER number for multiple ON TIMER(n) events.
  • _KEYDOWN (function) returns whether modifying keys like CTRL, ALT, SHIFT, and any other keys are pressed.
  • _KEYHIT (function) returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.
  • _LIMIT (statement) sets the loop repeat rate of a program to so many per second, relinquishing spare cpu cycles.


  • DATE$ (function) returns the present computer date in a mm-dd-yyyy string format
  • INKEY$ (function) can be used in a loop to wait for a keypress or a [Ctrl] + letter key combination.
  • INPUT (statement) can be used to wait for an [Enter] key press or a text or numerical menu entry.
  • INPUT$ (function) can be used to wait for a key press or a fixed length text entry.
  • ON KEY(n) (event statement) executes when a keypress or keypress combination occurs.
  • ON TIMER(n) (event statement) executes when a timed event occurs. QB64 can use multiple numbered timer events.
  • SLEEP (statement) pauses the program for a specified number of seconds or a until a key press is made.
  • TIME$ (function) returns the present computer time in a hh:mm:ss 24 hour string format
  • TIMER (function) returns the number of seconds past the previous midnite down to a QB64 accuracy of one millisecond.
  • TIMER (statement) enables, turns off or stops timer event trapping. In QB64 TIMER(n) FREE can free multiple timers.
  • WAIT (statement) normally used to delay program display execution during or after vertical retrace periods.

(Return to Table of Contents)


Window and Desktop

All Statements and Functions except SCREEN Compile in QB64 Only!
  • _COLORCHOOSERDIALOG (function) Displays a standard color picker dialog box and returns a 32-bit RGBA color selected by the user.
  • _DESKTOPHEIGHT (function) returns the height of the desktop (not program window).
  • _DESKTOPWIDTH (function) returns the width of the desktop (not program window).
  • _FULLSCREEN (function) returns the present full screen mode setting number of the screen window.
  • _FULLSCREEN (statement) sets the full screen mode of the screen window. Alt + Enter can do it manually.
  • _HEIGHT (function) returns the height of a _SCREENIMAGE handle to get the desktop resolution.
  • _ICON (statement) creates a program icon from an image file handle created by _LOADIMAGE. Cannot use .ICO files!
  • _INPUTBOX$ (function) Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box.
  • _MESSAGEBOX (function) Displays a message dialog box, which presents a message and returns the button ID clicked by the user.
  • _MESSAGEBOX (statement) Displays a message dialog box, which presents a message to the user.
  • _NEWIMAGE (statement) function prepares a window image surface and returns the handle value.
  • _NOTIFYPOPUP (statement) Shows a system notification popup.
  • _OPENFILEDIALOG$ (function) Displays a standard dialog box that prompts the user to open a file.
  • $RESIZE (metacommand) used with ON allows a user to resize the program window where OFF does not.
  • _RESIZE (function) returns -1 when a program user attempts to resize the program screen.
  • _RESIZEHEIGHT (function) returns the requested new user screen height when $RESIZE:ON allows it.
  • _RESIZEWIDTH (function) returns the requested new user screen width when $RESIZE:ON allows it.
  • _SAVEFILEDIALOG$ (function) Displays a standard dialog box that prompts the user to save a file.
  • _SCREENCLICK simulates clicking the mouse at a position on the screen to get focus.
  • _SCREENEXISTS (function) returns a -1 value once a screen has been created.
  • $SCREENHIDE (metacommand) hides the program window throughout the program until $SCREENSHOW is used.
  • _SCREENHIDE (statement) hides the main program window in a section of code until _SCREENSHOW is used.
  • _SCREENIMAGE (function) creates an image of the current desktop and returns an image handle.
  • _SCREENMOVE (statement) positions the program window on the desktop using designated coordinates or _MIDDLE.
  • _SCREENPRINT (statement) simulates typing text into a Windows program using the keyboard.
  • $SCREENSHOW (metacommand) displays the main program window throughout the program after $SCREENHIDE.
  • _SCREENSHOW (statement) displays the main program window in a section of code after _SCREENHIDE has been used.
  • _SCREENX (function) returns the current program window's upper left corner column position on the desktop.
  • _SCREENY (function) returns the current program window's upper left corner row position on the desktop.
  • _SELECTFOLDERDIALOG$ (function) Displays a dialog box that enables the user to select a folder (directory).
  • _SMOOTH (function) checks whether the current _FULLSCREEN mode has antialiasing enabled or not.
  • _TITLE (statement) sets the program name string in the title bar of the program window.
  • _WIDTH (function) returns the width of a _SCREENIMAGE handle to get the desktop resolution.


  • SCREEN sets the screen mode of a program. No statement defaults the program to SCREEN 0 text mode.


See also: Console Window, Windows Hot Keys or Focus on Program.

(Return to Table of Contents)


QB64 Programming Symbols

QB64 and QB Symbols
[Note: All symbols below can also be used inside of literal quoted strings except for quotation marks.]


Print, Input or File Formatting


Program Code Markers

(Return to Table of Contents)

Variable Name Type Suffixes

(Return to Table of Contents)

Numerical Base Prefixes


Mathematical Operations


Relational Operations
  • = (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)

(Return to Table of Contents)


QB64 Programming References

Wiki Pages
Main Page with Articles and Tutorials
QB64 specific keywords (alphabetical)
Original QBasic keywords (alphabetical)
QB64 OpenGL keywords (alphabetical)
Keywords by Usage
Got a question about something?
Frequently Asked Questions about QB64
QB64 Phoenix Edition Community Forum
Links to other QBasic Sites:
Pete's QBasic Forum
Pete's QBasic Downloads