Keyword Reference - Alphabetical: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOEDITSECTION__
__NOEDITSECTION__
__NOTOC__
__NOTOC__
<div id="toc"><p style="text-align: center"><br> '''Alphabetical QB64 Keyword Listings''' <br><br>     '''QB 64:'''  [[#uA|_A]] [[#uB|_B]] [[#uC|_C]] [[#uD|_D]] [[#uE|_E]] [[#uF|_F]] [[#uG|_G]] [[#uH|_H]] [[#uI|_I]] [[#uK|_K]] [[#uL|_L]] [[#uM|_M]] [[#uN|_N]] [[#uO|_O]] [[#uP|_P]] [[#uR|_R]] [[#uS|_S]] [[#uT|_T]] [[#uU|_U]] [[#uV|_V]] [[#uW|_W]]                <br><br>'''QBasic:'''  [[#A|A]]   [[#B|B]]   [[#C|C]]   [[#D|D]]   [[#E|E]]    [[#F|F]]   [[#G|G]]   [[#H|H]]    [[#I| I]]    [[#K|K]]   [[#L|L]]   [[#M|M]]   [[#N|N]]    [[#O|O]]   [[#P|P]]    [[#R|R]]   [[#S|S]]    [[#T|T]]   [[#U|U]]   [[#V|V]]   [[#W|W]]   [[#X|X]]   <br><br>'''OpenGL:'''   [[#glA|A]]    [[#glB|B]]    [[#glC|C]]    [[#glD|D]]    [[#glE|E]]     [[#glF|F]]    [[#glG|G]]    [[#glH|H]]    [[#glI| I  ]]   [[#glL|L]]    [[#glM|M]]    [[#glN|N]]     [[#glO|O]]    [[#glP|P]]     [[#glR|R]]    [[#glS|S]]     [[#glT|T]]     [[#glV|V]]       <br><br> [[#symbols|Symbols]] '''   -   ''' [[#references|References]]<br><br>{{small|Menu Created by Cyperium}}</p></div>
<div id="toc"><p style="text-align: center"><br> '''Alphabetical QB64 Keyword Listings''' <br><br>     [[#QB64 specific keywords|QB64:]]  [[#uA|_A]] [[#uB|_B]] [[#uC|_C]] [[#uD|_D]] [[#uE|_E]] [[#uF|_F]] [[#uG|_G]] [[#uH|_H]] [[#uI|_I]] [[#uK|_K]] [[#uL|_L]] [[#uM|_M]] [[#uN|_N]] [[#uO|_O]] [[#uP|_P]] [[#uR|_R]] [[#uS|_S]] [[#uT|_T]] [[#uU|_U]] [[#uV|_V]] [[#uW|_W]]                <br><br>[[#Original QBasic keywords|QBasic:]]  [[#A|A]]   [[#B|B]]   [[#C|C]]   [[#D|D]]   [[#E|E]]    [[#F|F]]   [[#G|G]]   [[#H|H]]    [[#I| I]]    [[#K|K]]   [[#L|L]]   [[#M|M]]   [[#N|N]]    [[#O|O]]   [[#P|P]]    [[#R|R]]   [[#S|S]]    [[#T|T]]   [[#U|U]]   [[#V|V]]   [[#W|W]]   [[#X|X]]   <br><br>[[#OpenGL specific keywords|OpenGL:]]   [[#glA|A]]    [[#glB|B]]    [[#glC|C]]    [[#glD|D]]    [[#glE|E]]     [[#glF|F]]    [[#glG|G]]    [[#glH|H]]    [[#glI| I  ]]   [[#glL|L]]    [[#glM|M]]    [[#glN|N]]     [[#glO|O]]    [[#glP|P]]     [[#glR|R]]    [[#glS|S]]     [[#glT|T]]     [[#glV|V]]       <br><br> [[#symbols|Symbols]] '''   -   ''' [[#references|References]]<br><br>{{small|Menu Created by Cyperium}}</p></div>




<center>[[QB64 FAQ|Go to Frequently Asked Questions about QB64]]


<center>[[QB64 FAQ|Go to Frequently Asked Questions about QB64]]</center>
[[Keyword Reference - By usage|Go to keywords by Usage]]


<p style="text-align: center">[[Keyword Reference - By usage|Go to keywords by Usage]]</p>
Keywords beginning with _underscores are QB64 specific. '''To use them without the prefix, use [[$NOPREFIX]].'''


<p style="text-align: center">Keywords beginning with _underscores are QB64 specific. '''To use them without the prefix, use [[$NOPREFIX]].'''</p>
[[Keywords currently not supported by QB64]]


<p style="text-align: center">[[Keywords currently not supported by QB64]]</p>
[[Keywords currently not supported by QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords Not Supported in Linux or MAC versions]]


<p style="text-align: center">[[Keywords currently not supported by QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keywords Not Supported in Linux or MAC versions]]</p>
Keywords without the underscore at the beginning should work with both QB 4.5 and QB64.


<p style="text-align: center">Keywords without the underscore at the beginning should work with both QB 4.5 and QB64.</p>
For comments or suggestions about this WIKI goto the [https://qb64phoenix.com/forum/forumdisplay.php?fid=25 Wiki Discussion Forum].


<p style="text-align: center">For comments or suggestions about this WIKI goto the [https://qb64phoenix.com/forum/forumdisplay.php?fid=25 Wiki Discussion Forum].</p>
'''If code examples only display partial code, use the browser Refresh button'''


<center>'''If code examples only display partial code, use the browser Refresh button'''</center>
[[Main Page|Main Page with Appendix and Tutorials]]</center>


<center>[[Main Page|Main Page with Appendix and Tutorials]]</center>


== QB64 specific keywords ==
<center>The underscore prefix is reserved for QB64 _KEYWORDS only.</center>




==QB64 specific keywords:==
----
 
<p style="text-align: center">The underscore prefix is reserved for QB64 _KEYWORDS only.</p>
 
<div id = "uA">_A</div>
<div id = "uA">_A</div>
* [[_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.}}
Line 48: Line 47:
* [[_AUTODISPLAY (function)]] {{text|returns the current display mode as true (-1) if automatic or false (0) if per request using [[_DISPLAY]].}}
* [[_AUTODISPLAY (function)]] {{text|returns the current display mode as true (-1) if automatic or false (0) if per request using [[_DISPLAY]].}}
* [[_AXIS]] (function) {{text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distance from the device axis center, 0.}}
* [[_AXIS]] (function) {{text|returns a [[SINGLE]] value between -1 and 1 indicating the maximum distance from the device axis center, 0.}}


----
----
<div id = "uB">_B</div>
<div id = "uB">_B</div>
* [[_BACKGROUNDCOLOR]] (function) {{text|returns the current [[SCREEN|screen page]] background color.}}
* [[_BACKGROUNDCOLOR]] (function) {{text|returns the current [[SCREEN|screen page]] background color.}}
Line 67: Line 65:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uC">_C</div>
<div id = "uC">_C</div>
* [[_CAPSLOCK (function)]] {{text|returns -1 when Caps Lock is on}}
* [[_CAPSLOCK (function)]] {{text|returns -1 when Caps Lock is on}}
Line 106: Line 101:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uD">_D</div>
<div id = "uD">_D</div>
* [[_D2G]] (function) {{text|converts degrees to gradient angle values.}}
* [[_D2G]] (function) {{text|converts degrees to gradient angle values.}}
Line 139: Line 131:


----
----
<div id = "uE">_E</div>
<div id = "uE">_E</div>
* [[_ECHO]] (statement) {{text|used in conjunction with $IF for the precompiler.}}
* [[_ECHO]] (statement) {{text|used in conjunction with $IF for the precompiler.}}
Line 154: Line 144:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uF">_F</div>
<div id = "uF">_F</div>
* [[_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.}}
Line 171: Line 158:
* [[_FULLSCREEN]] (statement) {{text|sets the program window to full screen or OFF. Alt + Enter does it manually.}}
* [[_FULLSCREEN]] (statement) {{text|sets the program window to full screen or OFF. Alt + Enter does it manually.}}
* [[_FULLSCREEN (function)]] {{text|returns the fullscreen mode in use by the program.}}
* [[_FULLSCREEN (function)]] {{text|returns the fullscreen mode in use by the program.}}


----
----
<div id = "uG">_G</div>
<div id = "uG">_G</div>
* [[_G2D]] (function) {{text|converts gradient to degree angle values.}}
* [[_G2D]] (function) {{text|converts gradient to degree angle values.}}
Line 183: Line 169:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uH">_H</div>
<div id = "uH">_H</div>
* [[_HEIGHT]] (function) {{text|returns the height of a designated image handle.}}
* [[_HEIGHT]] (function) {{text|returns the height of a designated image handle.}}
Line 194: Line 177:


----
----
<div id = "uI">_I</div>
<div id = "uI">_I</div>
* [[$IF]] (Pre-Compiler [[Metacommand]]) {{text|used to set an [[IF]] condition for the precompiler.}}
* [[$IF]] (Pre-Compiler [[Metacommand]]) {{text|used to set an [[IF]] condition for the precompiler.}}
Line 206: Line 187:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uK">_K</div>
<div id = "uK">_K</div>
*[[_KEYCLEAR]] (statement) {{text|clears the keyboard buffers for INKEY$, _KEYHIT, and INP.}}
*[[_KEYCLEAR]] (statement) {{text|clears the keyboard buffers for INKEY$, _KEYHIT, and INP.}}
Line 218: Line 195:


----
----
<div id = "uL">_L</div>
<div id = "uL">_L</div>
* [[$LET]] (Pre-Compiler [[Metacommand]]) {{text|used to set a variable for the precompiler.}}
* [[$LET]] (Pre-Compiler [[Metacommand]]) {{text|used to set a variable for the precompiler.}}
Line 230: Line 205:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uM">_M</div>
<div id = "uM">_M</div>
* [[_MAPTRIANGLE]] (statement) {{text|maps a triangular image source area to put on a destination area.}}
* [[_MAPTRIANGLE]] (statement) {{text|maps a triangular image source area to put on a destination area.}}
Line 266: Line 238:


----
----
<div id = "uN">_N</div>
<div id = "uN">_N</div>
* [[_NEWIMAGE]] (function) {{text|creates a designated size program [[SCREEN]] or page image and returns a handle value.}}
* [[_NEWIMAGE]] (function) {{text|creates a designated size program [[SCREEN]] or page image and returns a handle value.}}
Line 275: Line 245:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uO">_O</div>
<div id = "uO">_O</div>
* [[_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.}}
Line 291: Line 258:


----
----
<div id = "uP">_P</div>
<div id = "uP">_P</div>
* [[_PALETTECOLOR]] (statement) {{text|sets the color value of a palette entry of an image using 256 colors or less palette modes.}}
* [[_PALETTECOLOR]] (statement) {{text|sets the color value of a palette entry of an image using 256 colors or less palette modes.}}
Line 307: Line 272:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uR">_R</div>
<div id = "uR">_R</div>
* [[_R2D]] (function) {{text|converts radians to degree angle values.}}
* [[_R2D]] (function) {{text|converts radians to degree angle values.}}
Line 330: Line 292:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uS">_S</div>
<div id = "uS">_S</div>
* [[Mathematical Operations#Derived Mathematical Functions|_SEC]] (function) {{text|the mathematical function secant defined by 1/COS.}}
* [[Mathematical Operations#Derived Mathematical Functions|_SEC]] (function) {{text|the mathematical function secant defined by 1/COS.}}
Line 388: Line 347:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "uT">_T</div>
<div id = "uT">_T</div>
* [[Mathematical Operations#Derived Mathematical Functions|_TANH]] (function) {{text|Returns the hyperbolic tangent of x radians.}}
* [[Mathematical Operations#Derived Mathematical Functions|_TANH]] (function) {{text|Returns the hyperbolic tangent of x radians.}}
* [[_TITLE]] (statement) {{text|sets the program title [[STRING|string]] value.}}
* [[_TITLE]] (statement) {{text|sets the program title [[STRING|string]] value.}}
Line 403: Line 358:


----
----
<div id = "uU">_U</div>
<div id = "uU">_U</div>
* [[_UNSIGNED]] (numerical type) {{text|expands the positive range of numerical [[INTEGER]], [[LONG]] or [[_INTEGER64]] values returned.}}
* [[_UNSIGNED]] (numerical type) {{text|expands the positive range of numerical [[INTEGER]], [[LONG]] or [[_INTEGER64]] values returned.}}




----
----
<div id = "uV">_V</div>
<div id = "uV">_V</div>
* [[$VERSIONINFO]] ([[Metacommand]]) {{text|adds metadata to Windows only binaries for identification purposes across the OS.}}
* [[$VERSIONINFO]] ([[Metacommand]]) {{text|adds metadata to Windows only binaries for identification purposes across the OS.}}
* [[$VIRTUALKEYBOARD]] ([[Metacommand]]) ({{text|deprecated|red}}) {{text|turns the virtual keyboard ON or OFF for use in touch-enabled devices.}}
* [[$VIRTUALKEYBOARD]] ([[Metacommand]]) ({{text|deprecated|red}}) {{text|turns the virtual keyboard ON or OFF for use in touch-enabled devices.}}
Line 420: Line 369:


----
----
<div id = "uW">_W</div>
<div id = "uW">_W</div>
* [[_WHEEL]] (function) {{text|returns -1 when a control device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}}
* [[_WHEEL]] (function) {{text|returns -1 when a control device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.}}
* [[_WIDTH (function)]] {{text|returns the width of a [[SCREEN]] or image handle.}}
* [[_WIDTH (function)]] {{text|returns the width of a [[SCREEN]] or image handle.}}
Line 430: Line 376:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<center>([[Keyword Reference - Alphabetical#QB64 specific keywords:|Go to Top of QB64 specific keywords]])</center>




<center>([[Keyword Reference - Alphabetical#QB64 specific keywords:|Go to Top of QB64 specific keywords]])</center>
== Original QBasic keywords ==
<center>'''These QBasic keywords (with a few noted exceptions) will work in all versions of QB64.'''</center>


==Original QBasic keywords:==
'''<p style="text-align: center">These QBasic keywords (with a few noted exceptions) will work in all versions of QB64.</p>'''


----
<div id = "A">A</div>
<div id = "A">A</div>
* [[ABS]] (function) {{text|converts any negative numerical value to a positive value.}}
* [[ABS]] (function) {{text|converts any negative numerical value to a positive value.}}
Line 452: Line 400:


----
----
<div id = "B">B</div>
<div id = "B">B</div>
* [[BEEP]] (statement) {{text|creates an error sound of a fixed duration.}}
* [[BEEP]] (statement) {{text|creates an error sound of a fixed duration.}}
Line 462: Line 408:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "C">C</div>
<div id = "C">C</div>
* [[CALL]] (statement) {{text|optional statement that sends the program to a [[SUB]] procedure.  Requires parameters be enclosed in brackets(parenthesis).}}
* [[CALL]] (statement) {{text|optional statement that sends the program to a [[SUB]] procedure.  Requires parameters be enclosed in brackets(parenthesis).}}
Line 497: Line 440:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "D">D</div>
<div id = "D">D</div>
* [[DATA]] (statement) {{text|creates a line of fixed program information separated by commas.}}
* [[DATA]] (statement) {{text|creates a line of fixed program information separated by commas.}}
Line 519: Line 459:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "E">E</div>
<div id = "E">E</div>
* [[ELSE]] ([[IF...THEN]] statement) {{text|is used to direct program flow when no other condition is evaluated as true.}}
* [[ELSE]] ([[IF...THEN]] statement) {{text|is used to direct program flow when no other condition is evaluated as true.}}
Line 542: 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>
----
----
<div id = "F">F</div>
<div id = "F">F</div>
* [[FIELD]] (statement) {{text|defines the variable sizes to be written or read from a file.}}
* [[FIELD]] (statement) {{text|defines the variable sizes to be written or read from a file.}}
Line 560: Line 494:


----
----
<div id = "G">G</div>
<div id = "G">G</div>
* [[GET]] (file statement) {{text|reads a file sequencially or at a specific position and returns the value as the variable type used.}}
* [[GET]] (file statement) {{text|reads a file sequencially or at a specific position and returns the value as the variable type used.}}
Line 570: Line 502:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "H">H</div>
<div id = "H">H</div>
* [[HEX$]] (function) {{text|returns the hexadecimal (base 16) [[STRING]] representation of the [[INTEGER]] part of any value.}}
* [[HEX$]] (function) {{text|returns the hexadecimal (base 16) [[STRING]] representation of the [[INTEGER]] part of any value.}}
Line 579: Line 508:


----
----
<div id = "I">I</div>
<div id = "I">I</div>
* [[IF...THEN]] (statement) {{text|a conditional block statement used control program flow.}}
* [[IF...THEN]] (statement) {{text|a conditional block statement used control program flow.}}
Line 598: Line 525:
* [[IOCTL]] (statement)
* [[IOCTL]] (statement)
* [[IOCTL$]] (function)
* [[IOCTL$]] (function)


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "K">K</div>
<div id = "K">K</div>
* [[KEY n]] (statement) {{text|used with [[ON KEY(n)]] events to assign a "softkey" string to a key or create a  user defined key.}}
* [[KEY n]] (statement) {{text|used with [[ON KEY(n)]] events to assign a "softkey" string to a key or create a  user defined key.}}
Line 612: Line 535:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "L">L</div>
<div id = "L">L</div>
* [[LBOUND]] (function) {{text|returns the lower boundary of the specified array.}}
* [[LBOUND]] (function) {{text|returns the lower boundary of the specified array.}}
Line 640: Line 560:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "M">M</div>
<div id = "M">M</div>
* [[MID$]] (function) {{text|returns a designated portion of a [[STRING]].}}
* [[MID$]] (function) {{text|returns a designated portion of a [[STRING]].}}
Line 658: Line 575:


----
----
<div id = "N">N</div>
<div id = "N">N</div>
* [[NAME]] (statement) {{text|names an existing file name [[AS]] a new file name.}}
* [[NAME]] (statement) {{text|names an existing file name [[AS]] a new file name.}}
Line 666: Line 581:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "O">O</div>
<div id = "O">O</div>
* [[OCT$]] (function) {{text|returns the octal (base 8) [[STRING]] representation of the [[INTEGER]] part of any value.}}
* [[OCT$]] (function) {{text|returns the octal (base 8) [[STRING]] representation of the [[INTEGER]] part of any value.}}
Line 692: Line 604:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "P">P</div>
<div id = "P">P</div>
* [[PAINT]] (statement) {{text|fills an enclosed area of a graphics [[SCREEN|screen]] with a color until it encounters a specific colored border.}}
* [[PAINT]] (statement) {{text|fills an enclosed area of a graphics [[SCREEN|screen]] with a color until it encounters a specific colored border.}}
Line 721: Line 630:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "R">R</div>
<div id = "R">R</div>
* [[RANDOM]] (file mode) {{text|creates a file or opens an existing file to [[GET|read]] and [[PUT|write]] records of a set byte size.}}
* [[RANDOM]] (file mode) {{text|creates a file or opens an existing file to [[GET|read]] and [[PUT|write]] records of a set byte size.}}
Line 744: Line 650:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "S">S</div>
<div id = "S">S</div>
* [[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.}}
Line 783: Line 686:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "T">T</div>
<div id = "T">T</div>
* [[TAB]] (function) {{text|moves a designated number of columns on the [[SCREEN|screen]].}}
* [[TAB]] (function) {{text|moves a designated number of columns on the [[SCREEN|screen]].}}
Line 799: Line 699:


----
----
<div id = "U">U</div>
<div id = "U">U</div>
* [[UBOUND]] (function) {{text|returns the upper-most index number of a designated [[arrays|array]].}}
* [[UBOUND]] (function) {{text|returns the upper-most index number of a designated [[arrays|array]].}}
Line 809: Line 707:


<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
<p style="text-align: center">([[#toc|Return to Table of Contents]])</p>
----
----
<div id = "V">V</div>
<div id = "V">V</div>
* [[VAL]] (function) {{text|returns the numerical value of a [[STRING|string]] number.}}
* [[VAL]] (function) {{text|returns the numerical value of a [[STRING|string]] number.}}
Line 823: Line 718:


----
----
<div id = "W">W</div>
<div id = "W">W</div>
* [[WAIT]] (statement) {{text|waits until a vertical retrace is started or a [[SCREEN|screen]] draw ends.}}
* [[WAIT]] (statement) {{text|waits until a vertical retrace is started or a [[SCREEN|screen]] draw ends.}}
Line 837: Line 730:


----
----
<div id = "X">X</div>
<div id = "X">X</div>
* [[XOR]] (logic operator) {{text|is used to compare two numerical values bitwise.}}
* [[XOR]] (logic operator) {{text|is used to compare two numerical values bitwise.}}


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


<center>([[Keyword Reference - Alphabetical#Original QBasic keywords:|Go to Top of Original QB keywords]])</center>
<center>([[Keyword Reference - Alphabetical#Original QBasic keywords:|Go to Top of Original QB keywords]])</center>

Revision as of 23:29, 19 July 2022



Alphabetical QB64 Keyword Listings

    QB64:  _A _B _C _D _E _F _G _H _I _K _L _M _N _O _P _R _S _T _U _V _W                

QBasic:  A   B   C   D   E    F   G   H     I    K   L   M   N    O   P    R   S    T   U   V   W   X   

OpenGL:   A    B    C    D    E     F    G    H     I     L    M    N     O    P     R    S     T    V      

Symbols    -    References

Menu Created by Cyperium


Go to Frequently Asked Questions about QB64

Go to keywords by Usage

Keywords beginning with _underscores are QB64 specific. To use them without the prefix, use $NOPREFIX.

Keywords currently not supported by QB64

Keywords Not Supported in Linux or MAC versions

Keywords without the underscore at the beginning should work with both QB 4.5 and QB64.

For comments or suggestions about this WIKI goto the Wiki Discussion Forum.

If code examples only display partial code, use the browser Refresh button

Main Page with Appendix and Tutorials


QB64 specific keywords

The underscore prefix is reserved for QB64 _KEYWORDS only.



_A
  • _ACCEPTFILEDROP (statement) turns a program window into a valid drop destination for dragging files from Windows Explorer.
  • _ACOS (function) arccosine function returns the angle in radians based on an input COSine value range from -1 to 1.
  • _ACOSH (function) Returns the nonnegative arc hyperbolic cosine of x, expressed in radians.
  • _ALLOWFULLSCREEN (statement) allows setting the behavior of the ALT+ENTER combo.
  • _ALPHA (function) returns the alpha channel transparency level of a color value used on a screen page or image.
  • _ALPHA32 (function) returns the alpha channel transparency level of a color value used on a 32 bit screen page or image.
  • _ARCCOT (function) is the inverse function of the cotangent.
  • _ARCCSC (function) is the inverse function of the cosecant.
  • _ARCSEC (function) is the inverse function of the secant.
  • _ASIN (function) Returns the principal value of the arc sine of x, expressed in radians.
  • _ASINH (function) Returns the arc hyperbolic sine of x, expressed in radians.
  • _ASSERT (statement) Performs debug tests.
  • $ASSERTS (metacommand) enables debug tests with the _ASSERT macro.
  • _ATAN2 (function) Returns the principal value of the arc tangent of y/x, expressed in radians.
  • _ATANH (function) Returns the arc hyperbolic tangent of x, expressed in radians.
  • _AUTODISPLAY (statement) enables the automatic display of the screen image changes previously disabled by _DISPLAY.
  • _AUTODISPLAY (function) returns the current display mode as true (-1) if automatic or false (0) if per request using _DISPLAY.
  • _AXIS (function) returns a SINGLE value between -1 and 1 indicating the maximum distance from the device axis center, 0.



_B
  • _BACKGROUNDCOLOR (function) returns the current screen page background color.
  • _BIT (` numerical type) can return only signed values of 0 (bit off) and -1 (bit on). Unsigned 0 or 1.
  • _BIN$ (function) returns the binary (base 2) STRING representation of the INTEGER part of any value.
  • _BLEND (statement) statement turns on 32 bit alpha blending for the current image or screen mode and is default.
  • _BLEND (function) returns -1 if enabled or 0 if disabled by _DONTBLEND statement.
  • _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) function returns the palette or the blue component intensity of a 32-bit image color.
  • _BLUE32 (function) returns the blue component intensity of a 32-bit color value.
  • _BUTTON (function) returns -1 when a controller 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.
  • _BYTE (%% numerical type) can hold signed values from -128 to 127 (one byte or _BIT * 8). Unsigned from 0 to 255.

(Return to Table of Contents)


_C
  • _CAPSLOCK (function) returns -1 when Caps Lock is on
  • _CAPSLOCK (statement) sets Caps Lock key state
  • $CHECKING (QB64 C++ Metacommand) turns event and error checking OFF or ON.
  • _CEIL (function) Rounds x upward, returning the smallest integral value that is not less than x.
  • _CINP (function) Returns a key code from $CONSOLE input
  • _CLEARCOLOR (function) returns the current transparent color of an image.
  • _CLEARCOLOR (statement) sets a specific color index of an image to be transparent
  • _CLIP (PUT graphics option) allows placement of an image partially off of the screen.
  • _CLIPBOARD$ (function) returns the operating system's clipboard contents as a STRING.
  • _CLIPBOARD$ (statement) sets and overwrites the STRING value in the operating system's clipboard.
  • _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.
  • $COLOR (metacommand) includes named color constants in a program.
  • _COMMANDCOUNT (function) returns the number of arguments passed to the compiled program from the command line.
  • _CONNECTED (function) returns the status of a TCP/IP connection handle.
  • _CONNECTIONADDRESS$ (TCP/IP function) returns a connected user's STRING IP address value using the handle.
  • $CONSOLE (QB64 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)
  • _CONSOLETITLE (statement) creates the title of the console window using a literal or variable string.
  • _CONTINUE (statement) skips the remaining lines in a control block (DO/LOOP, FOR/NEXT or WHILE/WEND)
  • _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.
  • _COPYIMAGE (function) copies an image handle value to a new designated handle.
  • _COPYPALETTE (statement) copies the color palette intensities from one 4 or 8 BPP image to another image.
  • _COT (function) the mathematical function cotangent defined by 1/TAN.
  • _COTH (function) Returns the hyperbolic cotangent.
  • _COSH (function) Returns the hyperbolic cosine of x radians.
  • _CSC (function) the mathematical function cosecant defined by 1/SIN.
  • _CSCH (function) Returns the hyperbolic cosecant.
  • _CV (function) converts any _MK$ STRING value to the designated numerical type value.
  • _CWD$ (function) returns the current working directory as a STRING value.

(Return to Table of Contents)


_D
  • _D2G (function) converts degrees to gradient angle values.
  • _D2R (function) converts degrees to radian angle values.
  • $DEBUG (metacommand) enables debugging features, allowing you to step through your code line by line.
  • DECLARE LIBRARY (QB64 statement block) declares a C++, SDL or Operating System SUB or FUNCTION to be used.
  • DECLARE DYNAMIC LIBRARY (QB64 statement) declares DYNAMIC, CUSTOMTYPE or STATIC library (DLL) SUB or FUNCTION.
  • _DEFAULTCOLOR (function) returns the current default text color for an image handle or page.
  • _DEFINE (statement) defines a range of variable names according to their first character as a data type.
  • _DEFLATE$ (function) compresses a string
  • _DELAY (statement) suspends program execution for a SINGLE number of seconds.
  • _DEPTHBUFFER (statement) enables, disables, locks or clears depth buffering.
  • _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 SCREEN page destination for prints or graphics.
  • _DEST (function) returns the current destination screen page or image handle value.
  • _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.
  • _DIR$ (function) returns common paths in Windows only, like My Documents, My Pictures, My Music, Desktop.
  • _DIREXISTS (function) returns -1 if the Directory folder name string parameter exists. Zero if it does not.
  • _DISPLAY (statement) turns off the 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.
  • _DISPLAYORDER (statement) designates the order to render software, hardware and custom-opengl-code.
  • _DONTBLEND (statement) statement turns off default _BLEND 32 bit alpha blending for the current image or screen.
  • _DONTWAIT (SHELL action) specifies that the program should not wait until the shelled command/program is finished.
  • _DROPPEDFILE (function) returns the list of items (files or folders) dropped in a program's window after _ACCEPTFILEDROP is enabled.



_E
  • _ECHO (statement) used in conjunction with $IF for the precompiler.
  • $ELSE (Pre-Compiler Metacommand) used in conjunction with $IF for the precompiler.
  • $ELSEIF (Pre-Compiler Metacommand) used in conjunction with $IF for the precompiler.
  • $END IF (Pre-Compiler Metacommand) used in conjunction with $IF for the precompiler.
  • _ENVIRONCOUNT (function) returns the number of key/value pairs currently exist in the environment table.
  • $ERROR (precompiler metacommand) used to trigger compiler errors from within the precompiling pass.
  • _ERRORLINE (function) returns the source code line number that caused the most recent runtime error.
  • _ERRORMESSAGE$ (function) returns a human-readable message describing the most recent runtime error.
  • $EXEICON (QB64 Metacommand) used with a .ICO icon file name to embed the image into the QB64 executable.
  • _EXIT (function) prevents a user exit and indicates if a user has clicked the close X window button or CTRL + BREAK.

(Return to Table of Contents)


_F
  • _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).
  • _FLOAT (numerical type ##) offers the maximum floating-point decimal precision available using QB64.
  • _FONT (statement) sets the current font handle to be used by PRINT or _PRINTSTRING.
  • _FONT (function) creates a new font handle from a designated image handle.
  • _FONTHEIGHT (function) returns the current text or font height.
  • _FONTWIDTH (function) returns the current text or font width.
  • _FREEFONT (statement) releases the current font handle from memory.
  • _FREEIMAGE (statement) releases a designated image handle from memory.
  • _FREETIMER (function) returns an unused timer number value to use with ON TIMER(n).
  • _FULLSCREEN (statement) sets the program window to full screen or OFF. Alt + Enter does it manually.
  • _FULLSCREEN (function) returns the fullscreen mode in use by the program.



_G
  • _G2D (function) converts gradient to degree angle values.
  • _G2R (function) converts gradient to radian angle values.
  • _GLRENDER (statement) sets whether context is displayed, on top of or behind the software rendering.
  • _GREEN (function) function returns the palette or the green component intensity of a 32-bit image color.
  • _GREEN32 (function) returns the green component intensity of a 32-bit color value.

(Return to Table of Contents)


_H
  • _HEIGHT (function) returns the height of a designated image handle.
  • _HIDE (SHELL action) hides the command line display during a shell.
  • _HYPOT (function) Returns the hypotenuse of a right-angled triangle whose legs are x and y.



_I
  • $IF (Pre-Compiler Metacommand) used to set an IF condition for the precompiler.
  • _ICON (statement) designates a _LOADIMAGE image file handle to be used as the program's icon or loads the embedded icon (see $EXEICON).
  • _INCLERRORFILE$ {function) returns the name of the original source code $INCLUDE module that caused the most recent error.
  • _INCLERRORLINE (function) returns the line number in an included file that caused the most recent error.
  • _INFLATE$ (function) decompresses a string
  • _INSTRREV (function) allows searching for a substring inside another string, but unlike INSTR it returns the last occurrence instead of the first one.
  • _INTEGER64 (&& numerical type) can hold whole numerical values from -9223372036854775808 to 9223372036854775807.

(Return to Table of Contents)


_K
  • _KEYCLEAR (statement) clears the keyboard buffers for INKEY$, _KEYHIT, and INP.
  • _KEYHIT (function) returns ASCII one and two byte, SDL Virtual Key and Unicode keyboard key press codes.
  • _KEYDOWN (function) returns whether CTRL, ALT, SHIFT, combinations and other keys are pressed.



_L
  • $LET (Pre-Compiler Metacommand) used to set a variable for the precompiler.
  • _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$.
  • _LIMIT (statement) sets the loops per second rate to slow down loops and limit CPU usage.
  • _LOADFONT (function) designates a font TTF file to load and returns a handle value.
  • _LOADIMAGE (function) designates an image file to load and returns a handle value.

(Return to Table of Contents)


_M
  • _MAPTRIANGLE (statement) maps a triangular image source area to put on a destination area.
  • _MAPUNICODE (statement) maps a Unicode value to an ASCII code number.
  • _MAPUNICODE (function) returns the Unicode (UTF32) code point value of a mapped ASCII character code.
  • _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 blocks once.
  • _MEMGET (statement) reads a value from a designated memory block at a designated 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 block OFFSET
  • _MEMSOUND (function) returns a _MEM block referring to a designated sound handle's memory
  • _MIDDLE (_SCREENMOVE parameter) centers the program window on the desktop in any screen resolution.
  • _MK$ (function) converts a numerical value to a designated ASCII STRING value.
  • _MOUSEBUTTON (function) returns the status of a designated mouse button.
  • _MOUSEHIDE (statement) hides the mouse pointer from view
  • _MOUSEINPUT (function) returns a value if the mouse status has changed since the last read.
  • _MOUSEMOVE (statement) moves the mouse pointer to a designated position on the program SCREEN.
  • _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.
  • _MOUSESHOW (statement) displays the mouse cursor after it has been hidden or can change the cursor shape.
  • _MOUSEWHEEL (function) returns the number of mouse scroll wheel "clicks" since last read.
  • _MOUSEX (function) returns the current horizontal position of the mouse cursor.
  • _MOUSEY (function) returns the current vertical position of the mouse cursor.



_N
  • _NEWIMAGE (function) creates a designated size program SCREEN or page image and returns a handle value.
  • $NOPREFIX (metacommand) allows QB64-specific keywords to be used without the underscore prefix.
  • _NUMLOCK (function) returns -1 when Num Lock is on
  • _NUMLOCK (statement) sets Num Lock key state

(Return to Table of Contents)


_O
  • _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.
  • _OPENCLIENT (TCP/IP function) connects to a Host on the Internet as a Client and returns the Client status handle.
  • _OPENCONNECTION (TCP/IP function) open's a connection from a client that the host has detected and returns a status handle.
  • _OPENHOST (TCP/IP function) opens a Host and returns a Host status handle.
  • OPTION _EXPLICIT (Pre-compiler directive) instructs the compiler to require variable declaration with DIM or an equivalent statement.
  • OPTION _EXPLICITARRAY (Pre-compiler directive) instructs the compiler to require array declaration with DIM or an equivalent statement.
  • _OS$ (function) returns the QB64 compiler version in which the program was compiled as [WINDOWS], [LINUX] or [MACOSX] and [32BIT] or [64BIT].



_P
  • _PALETTECOLOR (statement) sets the color value of a palette entry of an image using 256 colors or less palette modes.
  • _PALETTECOLOR (function) return the 32 bit attribute color setting of an image or screen page handle's palette.
  • _PI (function) returns the value of π or parameter multiples for angle or circle calculations.
  • _PIXELSIZE (function) returns the pixel palette mode of a designated image handle.
  • _PRESERVE (REDIM action) preserves the data presently in an array when REDIM is used.
  • _PRINTIMAGE (statement) sends an image to the printer that is stretched to the current printer paper size.
  • _PRINTMODE (statement) sets the text or _FONT printing mode on a background when using PRINT or _PRINTSTRING.
  • _PRINTMODE (function) returns the present _PRINTMODE value number.
  • _PRINTSTRING (statement) locates and prints a text string using graphic coordinates.
  • _PRINTWIDTH (function) returns the pixel width of a text string to be printed using _PRINTSTRING.
  • _PUTIMAGE (statement) maps a rectangular image source area to an image destination area.

(Return to Table of Contents)


_R
  • _R2D (function) converts radians to degree angle values.
  • _R2G (function) converts radians to gradient angle values.
  • _RED (function) function returns the palette or the red component intensity of a 32-bit image color.
  • _RED32 (function) returns the red component intensity of a 32-bit color value.
  • _READBIT (function) returns the state of the specified bit of an integer variable.
  • _RESETBIT (function) is used to set the specified bit of an integer variable to 0.
  • $RESIZE (Metacommand) used with ON allows a user to resize the program window where OFF does not.
  • _RESIZE (statement) sets resizing of the window ON or OFF and sets the method as _STRETCH or _SMOOTH.
  • _RESIZE (function) returns -1 when a program user wants 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.
  • _RGB (function) returns the closest palette index OR the LONG 32 bit color value in 32 bit screens.
  • _RGB32 (function) returns the LONG 32 bit color value in 32 bit screens only
  • _RGBA (function) returns the closest palette index OR the LONG 32 bit color value in 32 bit screens with the ALPHA
  • _RGBA32 (function) returns the LONG 32 bit color value in 32 bit screens only with the ALPHA
  • _ROUND (function) rounds to the closest INTEGER, LONG or _INTEGER64 numerical value.

(Return to Table of Contents)


_S
  • _SEC (function) the mathematical function secant defined by 1/COS.
  • _SECH (function) Returns the hyperbolic secant.
  • _SCREENCLICK (statement) simulates clicking on a point on the desktop screen with the left mouse button.
  • _SCREENEXISTS (function) returns a -1 value once a screen has been created.
  • $SCREENHIDE ([QB64 [Metacommand]]) hides the program window from view.
  • _SCREENHIDE (statement) hides the program window from view.
  • _SCREENICON (function) returns -1 or 0 to indicate if the window has been minimized to an icon on the taskbar.
  • _SCREENICON (statement) minimizes the program window to an icon on the taskbar.
  • _SCREENIMAGE (function) creates an image of the current desktop and returns an image handle.
  • _SCREENMOVE (statement) positions program window on the desktop using designated coordinates or the _MIDDLE option.
  • _SCREENPRINT (statement) simulates typing text into a Windows program using the keyboard.
  • $SCREENSHOW (QB64 Metacommand) displays the program window after it was hidden.
  • _SCREENSHOW (statement) displays the program window after it has been hidden by _SCREENHIDE.
  • _SCREENX (function) returns the program window's upper left corner horizontal position on the desktop.
  • _SCREENY (function) returns the program window's upper left corner vertical position on the desktop.
  • _SCROLLLOCK (function) returns -1 when Scroll Lock is on
  • _SCROLLLOCK (statement) sets Scroll Lock key state
  • _SETALPHA (statement) sets the alpha channel transparency level of some or all of the pixels of an image.
  • _SETBIT (function) is used to set the specified bit of an integer variable to 1.
  • _SHELLHIDE (function) returns the code sent by a program exit using END or SYSTEM followed by an INTEGER value.
  • _SHL (function) used to shift the bits of a numerical value to the left
  • _SHR (function) used to shift the bits of a numerical value to the right.
  • _SINH (function) Returns the hyperbolic sine of x radians.
  • _SNDBAL (statement) attempts to set the balance or 3D position of a sound file.
  • _SNDCLOSE (statement) frees and unloads an open sound using the sound handle created by _SNDOPEN.
  • _SNDCOPY (function) copies a sound handle value to a new designated handle.
  • _SNDGETPOS (function) returns the current playing position in seconds from a sound file.
  • _SNDLEN (function) returns the length of a sound in seconds from a sound file.
  • _SNDLIMIT (statement) stops playing a sound after it has been playing for a set number of seconds.
  • _SNDLOOP (statement) plays a sound repeatedly until _SNDSTOP is used.
  • _SNDOPEN (function) loads a sound file and returns a sound handle.
  • _SNDOPENRAW (function) opens a new channel to shove _SNDRAW content into without mixing.
  • _SNDPAUSE (statement) stops playing a sound file until resumed.
  • _SNDPAUSED (function) returns the current pause status of a sound file handle.
  • _SNDPLAY (statement) plays a sound file handle that was created by _SNDOPEN or _SNDCOPY.
  • _SNDPLAYCOPY (statement) copies a sound handle, plays it and automatically closes the copy when done.
  • _SNDPLAYFILE (statement) directly plays a designated sound file.
  • _SNDPLAYING (function) returns the current playing status of a sound handle.
  • _SNDRATE (function) returns the sound card sample rate to set _SNDRAW durations.
  • _SNDRAW (statement) creates mono or stereo sounds from calculated wave frequency values.
  • _SNDRAWDONE (statement) pads a _SNDRAW stream so the final (partially filled) buffer section is played.
  • _SNDRAWLEN (function) returns a value until the _SNDRAW buffer is empty.
  • _SNDSETPOS (statement) sets the playing position of a sound handle.
  • _SNDSTOP (statement) stops playing a sound handle.
  • _SNDVOL (statement) sets the volume of a sound file handle.
  • _SOURCE (statement) sets the source image handle.
  • _SOURCE (function) returns the present source image handle value.
  • _STARTDIR$ (function) returns the user's program calling path as a STRING.
  • _STRCMP (function) compares the relationship between two strings.
  • _STRICMP (function) compares the relationship between two strings, without regard for case-sensitivity.

(Return to Table of Contents)


_T
  • _TANH (function) Returns the hyperbolic tangent of x radians.
  • _TITLE (statement) sets the program title string value.
  • _TITLE$ (function) gets the program title string value.
  • _TOGGLEBIT (function) is used to toggle the specified bit of an integer variable from 1 to 0 or 0 to 1.
  • _TOTALDROPPEDFILES (function) returns the number of items (files or folders) dropped in a program's window after _ACCEPTFILEDROP is enabled.
  • _TRIM$ (function) shorthand to LTRIM$(RTRIM$("text"))



_U



_V



_W
  • _WHEEL (function) returns -1 when a control device wheel is scrolled up and 1 when scrolled down. Zero indicates no activity.
  • _WIDTH (function) returns the width of a SCREEN or image handle.
  • _WINDOWHANDLE (function) returns the window handle assigned to the current program by the OS. Windows-only.
  • _WINDOWHASFOCUS (function) returns true (-1) if the current program's window has focus. Windows-only.

(Return to Table of Contents)

(Go to Top of QB64 specific keywords)


Original QBasic keywords

These QBasic keywords (with a few noted exceptions) will work in all versions of QB64.



A
  • ABS (function) converts any negative numerical value to a positive value.
  • ABSOLUTE (statement) is used to access computer interrupt registers.
  • ACCESS (file statement) sets the read and write access of a file when opened.
  • ALIAS (QB64 DECLARE LIBRARY statement) denotes the actual name of an imported FUNCTION or SUB procedure.
  • AND (logical operator) is used to compare two numerical values bitwise.
  • AND (boolean) conditonal operator is used to include another evaluation in an IF...THEN or Boolean statement.
  • APPEND (file mode) creates a new file or allows an existing file to have data added using WRITE or PRINT
  • AS is used to denote a variable type or file number.
  • ASC (function) returns the ASCII code number of a text string character.
  • ASC (statement) (QB64 only) sets the code value of an ASCII text character at a designated string position.
  • ATN (function) or arctangent returns the angle in radians of a numerical tangent value.



B
  • BEEP (statement) creates an error sound of a fixed duration.
  • BINARY (file mode) creates or opens an existing file for read and write byte-wise access.
  • BLOAD (statement) transfers the contents of a BINARY BSAVE file to a specific array.
  • BSAVE (statement) transfers the contents of an array to a specified size BINARY file.
  • BYVAL (statement) assigns a numerical variable value by its value, not the name.

(Return to Table of Contents)


C
  • CALL (statement) optional statement that sends the program to a SUB procedure. Requires parameters be enclosed in brackets(parenthesis).
  • CALL ABSOLUTE (statement) is used to access computer interrupt registers.
  • CASE (SELECT CASE condition) designates specific conditions in a SELECT CASE statement block.
  • CASE ELSE (SELECT CASE condition) designates an alternative condition to be evaluated in a SELECT CASE statement block.
  • CASE IS (SELECT CASE condition) designates specific conditions in a SELECT CASE statement block.
  • CDBL (function) returns the closest DOUBLE value of a number.
  • CHAIN (statement) sends a program to another specified program module or compiled program.
  • CHDIR (statement) changes the current program path for file access.
  • CHR$ (function) returns a text string character by the specified ASCII code number.
  • CINT (function) returns the closest INTEGER value of a numerical value.
  • CIRCLE (statement) creates a circle, ellipse or arc at a designated graphical coordinate position.
  • CLEAR (statement) sets all variable and array values to zero number values or empty STRINGs.
  • CLNG (function) returns the closest LONG value of a numerical value.
  • CLOSE (statement) closes specific file number(s) or all files when a number is not specified.
  • CLS (statement) clears a program screen, VIEW port or WINDOW.
  • COLOR (statement) sets the current text foreground and/or background color to be used.
  • COMMAND$ (function) returns the command line arguments passed when a program is run.
  • COMMON (statement) sets a variable name as shared by CHAINed program modules.
  • CONST (statement) sets a variable name and its value as a constant value to be used by all procedures.
  • COS (function) returns the cosine of a radian angle value.
  • CSNG (function) returns the closest SINGLE value of a numerical value.
  • CSRLIN (function) returns the present PRINT cursor text row SCREEN coordinate position.
  • CVD (function) returns the DOUBLE numerical value of an 8 byte MKD$ string.
  • CVDMBF (function) returns the DOUBLE numerical value of a Microsoft Binary Format string.
  • CVI (function) returns the INTEGER numerical value of a 2 byte MKI$ string.
  • CVL (function) returns the LONG numerical value of a 4 byte MKL$ string.
  • CVS (function) returns the SINGLE numerical value of a 4 byte MKS$ string.
  • CVSMBF (function) returns the SINGLE numerical value of a Microsoft Binary Format string.

(Return to Table of Contents)


D
  • DATA (statement) creates a line of fixed program information separated by commas.
  • DATE$ (function) returns the present Operating System date string formatted as mm-dd-yyyy.
  • DECLARE LIBRARY (QB64 statement block) declares a C++, SDL or Operating System SUB or FUNCTION to be used.
  • DECLARE DYNAMIC LIBRARY (QB64 statement) declares DYNAMIC, CUSTOMTYPE or STATIC library(DLL) SUB or FUNCTION.
  • DEF SEG (statement) defines a segment in memory to be accessed by a memory procedure.
  • DEFDBL (statement) defines a set of undefined variable name starting letters as DOUBLE type numerical values.
  • DEFINT (statement) defines a set of undefined variable name starting letters as INTEGER type numerical values.
  • DEFLNG (statement) defines a set of undefined variable name starting letters as LONG type numerical values.
  • DEFSNG (statement) defines a set of undefined variable name starting letters as SINGLE type numerical values.
  • DEFSTR (statement) defines a set of undefined variable name starting letters as STRING type values.
  • DIM (statement) defines a variable as a specified type and can size a STATIC array.
  • DO...LOOP (statement) sets a recursive procedure loop that can be ignored or exited using conditional arguments.
  • DOUBLE (numerical type #) 8 byte value limited to values up to 15 decimal places.
  • DRAW (statement) uses a special string format that draws graphical lines in specific directions.
  • $DYNAMIC (Metacommand) used at the start of a program to set all program arrays as changeable in size using REDIM.

(Return to Table of Contents)


E
  • ELSE (IF...THEN statement) is used to direct program flow when no other condition is evaluated as true.
  • ELSEIF (IF...THEN statement) is used with THEN to set alternate conditional evaluations.
  • END (statement) sets the end of a program, sub-procedure, statement block, DECLARE LIBRARY or TYPE definition.
  • END IF (statement) ENDs an IF...THEN conditional block statement using more than one line of code.
  • ENVIRON (statement) temporarily sets an environmental key/pair value.
  • ENVIRON$ (function) returns a specified string setting or numerical position as an environmental STRING value.
  • EOF (file function) returns -1 when a file INPUT or GET has reached the end of a file.
  • EQV (logic operator) is used to compare two numerical values bitwise.
  • ERASE (statement) clears the values from $STATIC arrays and completely removes $DYNAMIC arrays.
  • ERDEV (function) returns an error code from the last device to create an error.
  • ERDEV$ (function) returns the 8 character name of the last device to declare an error as a string.
  • ERL (error function) returns the closest line number before an error occurred if line numbers are used.
  • ERR (function) returns the ERROR code when a program error occurs.
  • ERROR (statement) sets a specific ERROR code to be simulated.
  • EXIT (statement) immediately exits a program FOR...NEXT, DO...LOOP, SUB or FUNCTION procedure.
  • EXP (function) returns the value of e to the exponential power specified.

(Return to Table of Contents)


F
  • FIELD (statement) defines the variable sizes to be written or read from a file.
  • FILEATTR (function) returns the current file access mode.
  • FILES (statement) returns a list of files in the current directory path to the SCREEN.
  • FIX (function) returns the rounded INTEGER value of a numerical value.
  • FOR...NEXT (statement) creates a recursive loop procedure that loop a specified number of times.
  • FOR (file statement) used in an OPEN file or device statement to indicate the access mode.
  • FRE (function) returns the number of bytes of Memory available to running programs.
  • FREE (QB64 TIMER statement) frees a numbered TIMER event in QB64.
  • FREEFILE (file function) returns a file number that is currently not in use by the Operating System.
  • FUNCTION (procedure block) sub-procedure that can calculate and return one value to a program in its name.



G
  • GET (file statement) reads a file sequencially or at a specific position and returns the value as the variable type used.
  • GET (QB64 TCP/IP statement) reads a connection port to return a value.
  • GET (graphics statement) maps an area the current screen's video information and places it in an INTEGER array.
  • GOSUB (statement) sends the program to a designated line label procedure in the main program.
  • GOTO (statement) sends the program to a designated line number or line label in a procedure.

(Return to Table of Contents)


H
  • HEX$ (function) returns the hexadecimal (base 16) STRING representation of the INTEGER part of any value.



I
  • IF...THEN (statement) a conditional block statement used control program flow.
  • IMP (logic operator) is used to compare two numerical values bitwise.
  • $INCLUDE (Metacommand) designates a text code library file to include with the program.
  • INKEY$ (function) ASCII returns a string value entry from the keyboard.
  • INP (function) returns a numerical value from a specified port register address. See Keyboard scancodes
  • INPUT (statement) a user input that returns a value to one or more specified variable(s).
  • INPUT (file mode) OPEN statement that only allows an existing file to be read using INPUT (file statement) or INPUT$.
  • INPUT (file statement) reads a file sequentially using the variable types designated.
  • INPUT$ (function) returns a designated number of string bytes from the keyboard entry or a file number.
  • INSTR (function) returns the position in a text string where a character sequence match starts.
  • INT (function) rounds a numerical value to an INTEGER value by removing the decimal point fraction.
  • INTEGER (% numerical type) 2 byte whole values from -32768 to 32767.
  • INTERRUPT (statement) is used to access computer interrupt registers.
  • INTERRUPTX (statement) is used to access computer interrupt registers.
  • IOCTL (statement)
  • IOCTL$ (function)

(Return to Table of Contents)


K
  • KEY n (statement) used with ON KEY(n) events to assign a "softkey" string to a key or create a user defined key.
  • KEY(n) (statement) used with ON KEY(n) events to assign, enable, disable or suspend event trapping.
  • KEY LIST (statement) lists the 12 Function key soft key string assignments going down left side of screen.
  • KILL (statement) deletes the specified file without a warning. Remove empty folders with RMDIR.

(Return to Table of Contents)


L
  • LBOUND (function) returns the lower boundary of the specified array.
  • LCASE$ (function) returns the lower case value of a STRING.
  • LEFT$ (function) returns the specified number of text characters from the left end of a STRING.
  • LEN (function) returns the length or number of characters in a STRING value in bytes.
  • LET (statement) assigns a variable a literal value. Not required.
  • LINE (statement) creates a graphic line or box on the SCREEN.
  • LINE INPUT (statement) user input can be any text character including commas and quotes as a STRING value only.
  • LINE INPUT (file statement) returns an entire text file line and returns it as a STRING value.
  • LIST displays the current ON KEY(n) function key (F1 to F10) "soft key" settings.
  • LOC (function) returns the present file byte position or number of bytes in the OPEN COM buffer.
  • LOCATE (statement) sets the text cursor's row and column position for a PRINT or INPUT statement.
  • LOCK (statement) restricts access to portions or all of a file by other programs or processes.
  • LOF (function) returns the size of an OPEN file in bytes.
  • LOG (function) returns the natural logarithm of a specified numerical value
  • LONG (& numerical type) 4 byte whole values from -2147483648 to 2147483647.
  • LOOP (block statement) bottom end of a recursive DO loop.
  • LPOS (function) returns the printer head position.
  • LPRINT (statement) sends STRING data to the default LPT or USB printer.
  • LPRINT USING (statement) sends template formatted text to the default LPT or USB printer.
  • LSET (statement) left justifies the text in a string so that there are no leading spaces.
  • LTRIM$ (function) returns a string value with no leading spaces.

(Return to Table of Contents)


M
  • MID$ (function) returns a designated portion of a STRING.
  • MID$ (statement) redefines existing characters in a STRING.
  • MKD$ (function) returns an 8 byte ASCII string representation of a DOUBLE numerical value.
  • MKDIR (statement) creates a new folder in the current or designated program path.
  • MKDMBF$ (function) returns an 8 byte Microsoft Binary Format STRING representation of a DOUBLE numerical value.
  • MKI$ (function) returns a 2 byte ASCII string representation of an INTEGER.
  • MKL$ (function) returns a 4 byte ASCII string representation of a LONG numerical value.
  • MKS$ (function) returns a 4 byte ASCII string representation of a SINGLE numerical value.
  • MKSMBF$ (function) returns an 8 byte Microsoft Binary Format STRING representation of a DOUBLE numerical value.
  • MOD (math operator) performs integer remainder division on a numerical value.



N
  • NAME (statement) names an existing file name AS a new file name.
  • NEXT (statement) bottom end of a FOR...NEXT counter loop to returns to the start or a RESUME NEXT error.
  • NOT (logical operator) inverts the value of a logic operation or returns True when a boolean evaluation is False.

(Return to Table of Contents)


O
  • OCT$ (function) returns the octal (base 8) STRING representation of the INTEGER part of any value.
  • OFF (event statement) turns off all ON event checking.
  • ON COM(n) (statement) sets up a COM port event procedure call.
  • ON ERROR (statement) sets up and activates an error event checking procedure call. Use to avoid program errors.
  • ON KEY(n) (statement) sets up a keyboard key entry event procedure.
  • ON PEN (statement) sets up a pen event procedure call.
  • ON PLAY(n) (statement) sets up a PLAY event procedure call.
  • ON STRIG(n) (statement) sets up a joystick button event procedure call.
  • ON TIMER(n) (statement) sets up a timed event procedure call.
  • ON UEVENT (statement) Not implemented in QB64.
  • ON...GOSUB (statement) sets up a numerical event procedure call.
  • ON...GOTO (statement) sets up a numerical event procedure call.
  • OPEN (file statement) opens a file name for an access mode with a specific file number.
  • OPEN COM (statement) opens a serial communication port for access at a certain speed and mode.
  • OPTION BASE (statement) can set the lower boundary of all arrays to 1.
  • OR (logic operator) is used to compare two numerical values bitwise.
  • OR (boolean) conditonal operator is used to include an alternative evaluation in an IF...THEN or Boolean statement.
  • OUT (statement) writes numerical data to a specified register port.
  • OUTPUT (file mode) creates a new file or clears all data from an existing file to acess the file sequencially.

(Return to Table of Contents)


P
  • PAINT (statement) fills an enclosed area of a graphics screen with a color until it encounters a specific colored border.
  • 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.
  • PCOPY (statement) swaps two designated memory page images when page swapping is enabled in the SCREEN statement.
  • PEEK (function) returns a numerical value from a specified segment address in memory.
  • PEN (function) returns requested information about the lightpen device used.
  • PEN (statement) enables/disables or suspends event trapping of a lightpen device.
  • PLAY(n) (function) returns the number of notes currently in the background music queue.
  • PLAY (statement) uses a special string format that can produce musical tones and effects.
  • PMAP (function) returns the physical or WINDOW view graphic coordinates.
  • POINT (function) returns the color attribute number or 32 bit _RGB32 value.
  • POKE (statement) writes a numerical value to a specified segment address in memory.
  • POS (function) returns the current text column position of the text cursor.
  • PRESET (statement) sets a pixel coordinate to the background color unless one is specified.
  • PRINT (statement) prints text strings or numerical values to the SCREEN.
  • PRINT (file statement) prints text strings or numerical values to a file.
  • PRINT USING (statement) prints a template formatted string to the SCREEN.
  • PRINT USING (file statement) prints a template formatted string to a file.
  • PSET (statement) sets a pixel coordinate to the current color unless a color is designated.
  • PUT (file I/O statement) writes data sequencially or to a designated position using a variable value.
  • PUT (QB64 TCP/IP statement) sends raw data to a user's connection handle.
  • PUT (graphics statement) places pixel data stored in an INTEGER array to a specified area of the SCREEN.

(Return to Table of Contents)


R
  • RANDOM (file mode) creates a file or opens an existing file to read and write records of a set byte size.
  • RANDOMIZE (statement) sets the random seed value for a specific sequence of random RND values.
  • RANDOMIZE USING (QB64 statement) restarts the designated seed value's random sequence of values from the beginning.
  • READ (statement) reads values from a DATA field. ACCESS READ is used with the OPEN statement.
  • REDIM (statement) creates a new dynamic array or resizes one without losing data when _PRESERVE is used.
  • REM (statement) or an apostrophe tells the program to ignore statements following it on the same line.
  • RESET (statement) closes all files and writes the directory information to a diskette before it is removed from a disk drive.
  • RESTORE (statement) resets the DATA pointer to the start of a designated field of data.
  • RESUME (statement) an error handling procedure exit that can send the program to a line number or the NEXT code line.
  • RETURN (statement) returns the program to the code immediately following a GOSUB call.
  • RIGHT$ (function) returns a specific number of text characters from the right end of a STRING.
  • RMDIR (statement) removes an empty folder from the current path or the one designated.
  • RND (function) returns a random number value from 0 to .9999999.
  • RSET (statement) right justifies a string value so that any end spaces are moved to the beginning.
  • RTRIM$ (function) returns a string with all spaces removed from the right end.
  • RUN (statement) clears and restarts the program currently in memory or executes another specified program.

(Return to Table of Contents)


S
  • SADD (function) returns the address of a STRING variable as an offset from the current data segment.
  • SCREEN (function) can return the ASCII character code or color of the text at a text designated coordinate.
  • SCREEN (statement) sets the display mode and size of the program window.
  • SEEK (function) returns the present byte position in an opened file.
  • SEEK (statement) moves to a specified position in an opened file.
  • SELECT CASE (statement) a program flow block that can handle numerous conditional evaluations.
  • SETMEM (function) sets the memory to use.
  • SGN (function) returns -1 for negative, 0 for zero, and 1 for positive numerical values.
  • SHARED (statement) designates that a variable can be used by other procedures or the main procedure when in a sub-procedure.
  • SHELL (statement) sends STRING commands to the command line. SHELL calls will not affect the current path.
  • SHELL (QB64 function) executes an external command or calls another program. Returns codes sent by END or SYSTEM.
  • SIGNAL (OS 2 event)
  • SIN (function) returns the sine of a radian angle.
  • SINGLE (! numerical type) 4 byte floating decimal point values up to 7 decimal places.
  • SLEEP (statement) pauses the program for a designated number of seconds or until a key is pressed.
  • SOUND (statement) creates a sound of a specified frequency and duration.
  • SPACE$ (function) returns a designated number of spaces to a STRING.
  • SPC (function) moves the text cursor a number of spaces on the SCREEN.
  • SQR (function) returns the square root of a non-negative number.
  • STATIC (statement) creates a SUB or FUNCTION variable that retains its value.
  • $STATIC (Metacommand) used at the start of a program to set all program arrays as unchangeable in size using DIM.
  • STEP (keyword) move relatively from one graphic position or change the counting increment in a FOR...NEXT loop.
  • STICK (function) returns the present joystick position.
  • STOP (statement) stops a program when troubleshooting or stops an ON event.
  • STR$ (function) returns a string value of a number with a leading space when it is positive.
  • STRIG (function) returns the joystick button press values when read.
  • STRIG(n) (statement)
  • STRING ($ variable type) one byte text variable with ASCII code values from 0 to 255.
  • STRING$ (function) returns a designated number of string characters.
  • SUB (procedure block) sub-procedure that can calculate and return multiple parameter values.
  • SWAP (statement) swaps two string or numerical values.
  • SYSTEM (statement) ends a program immediately.

(Return to Table of Contents)


T
  • TAB (function) moves a designated number of columns on the screen.
  • TAN (function) returns the ratio of SINe to COSine or tangent value of an angle measured in radians.
  • THEN (IF...THEN keyword) must be used in a one line IF...THEN program flow statement.
  • TIME$ (function) returns the present time setting of the Operating System as a format hh:mm:ss STRING.
  • TIMER (function) returns the number of seconds since midnight as a SINGLE value.
  • TIMER (statement) events based on the designated time interval and timer number.
  • TO indicates a range of numerical values or an assignment of one value to another.
  • TYPE (definition) defines a variable type or file record that can include any STRING or numerical types.



U
  • UBOUND (function) returns the upper-most index number of a designated array.
  • UCASE$ (function) returns an uppercase representation of a specified STRING.
  • UEVENT (statement) Not implemented in QB64.
  • UNLOCK (statement) unlocks a designated file or portions of it.
  • UNTIL (condition) evaluates a DO...LOOP condition until it is True.

(Return to Table of Contents)


V
  • VAL (function) returns the numerical value of a string number.
  • VARPTR (function) returns the segment pointer address in memory.
  • VARPTR$ (function) returns the string value of a numerical value in memory.
  • VARSEG (function) returns the segment address of a value in memory.
  • VIEW (graphics statement) sets up a graphic view port area of the screen.
  • VIEW PRINT (statement) sets up a text viewport area of the screen.



W
  • WAIT (statement) waits until a vertical retrace is started or a screen draw ends.
  • WEND (statement) the bottom end of a WHILE...WEND loop.
  • WHILE (condition) evaluates a DO...LOOP or WHILE...WEND condition until it is False.
  • WHILE...WEND (statement) sets a recursive procedure loop that can only be exited using the WHILE conditional argument.
  • WIDTH (statement) sets the text column and row sizes in several SCREEN modes.
  • WINDOW (statement) maps a window size different from the program's window size.
  • WRITE (screen I/O statement) prints variable values to the screen with commas separating each value.
  • WRITE (file statement) writes data to a file with each variable value separated by commas.



X
  • XOR (logic operator) is used to compare two numerical values bitwise.

(Return to Table of Contents)

(Go to Top of Original QB keywords)


OpenGL specific keywords

All QB64 OpenGL keywords must use the underscore _gl prefix with the alphabetically listed function names.
Use $NOPREFIX to enable these to be used without the leading underscore.



_glA



_glB

(Return to Table of Contents)


_glC

(Return to Table of Contents)

(Return to Table of Contents)


_glD



_glE

(Return to Table of Contents)


_glF
  • _glFeedbackBuffer (statement) controls feedback mode.
  • _glFinish (statement) blocks until all OpenGL execution is complete.
  • _glFlush (statement) forces execution of OpenGL functions in finite time.
  • _glFogf (statement) OpenGL command
  • _glFogfv (statement) OpenGL command
  • _glFogi (statement) OpenGL command
  • _glFogiv (statement) OpenGL command
  • _glFrontFace (statement) defines front-facing and back-facing polygons.
  • _glFrustum (statement) OpenGL command

(Return to Table of Contents)


_glG

(Return to Table of Contents)


_glH
  • _glHint (statement) specifies implementation-specific hints.



_glI

(Return to Table of Contents)


_glL

(Return to Table of Contents)


_glM



_glN

(Return to Table of Contents)


_glO



_glP

(Return to Table of Contents)


_glR

(Return to Table of Contents)

(Return to Table of Contents)


_glS



_glT

(Return to Table of Contents)

(Return to Table of Contents)


_glV

(Return to Table of Contents)


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
  • <> Not equal condition
  • > Greater than condition
  • < Less than condition
  • >= Greater than or equal to condition
  • <= Less than or equal to condition

(Return to Table of Contents)

References:

WIKI Pages

Go to QB64 specific keywords

Go to Top of Original QB keywords

Go to keywords by Usage

Main Page with Appendix and Tutorials


Got a question about something?

Visit the QB64 FAQ

Visit the QB64 Main Site

Visit QB64 Community Forum


Links to other QBasic Sites:

Member programs at QBasic Station

QBasic Forum at Network 54

Pete's QBasic Forum

Pete's QBasic Downloads


(Return to Table of Contents)