Difference between revisions of "Syntax Reference - QB64"

From QB64 Wiki
Jump to navigation Jump to search
imported>Cyperium
imported>Cyperium
Line 6: Line 6:
 
* <code>{{Parameter|result&}} = {{KW|_ALPHA}}({{Parameter|c&}}[, {{Parameter|imageHandle&}}])</code>  {{discrete|&rarr; Returns the alpha opacity for the image specified or the current image.}}
 
* <code>{{Parameter|result&}} = {{KW|_ALPHA}}({{Parameter|c&}}[, {{Parameter|imageHandle&}}])</code>  {{discrete|&rarr; Returns the alpha opacity for the image specified or the current image.}}
  
* <code>{{Parameter|result&}} = {{KW|_ALPHA32}}({{Parameter|c&}}[, {{Parameter|imageHandle&}}])</code>  {{text|&rarr; Returns the alpha opacity for the image specified or the current image.}}
+
* <code>{{Parameter|result&}} = {{KW|_ALPHA32}}({{Parameter|c&}}[, {{Parameter|imageHandle&}}])</code>  {{discrete|&rarr; Returns the alpha opacity for the image specified or the current image.}}
  
* <code>{{KW|_AUTODISPLAY}}</code> {{text|&rarr; Turns on autodisplay if it was disabled using _DISPLAY.}}
+
* <code>{{KW|_AUTODISPLAY}}</code> {{discrete|&rarr; Turns on autodisplay if it was disabled using _DISPLAY.}}
  
  
  
* <code>{{Parameter|BG}} = {{KW|_BACKGROUNDCOLOR}}</code> {{text|&rarr; Returns the current background color.}}
+
* <code>{{Parameter|BG}} = {{KW|_BACKGROUNDCOLOR}}</code> {{discrete|&rarr; Returns the current background color.}}
  
* <code>...AS [_UNSIGNED] {{KW|_BIT}} [*{{Parameter|numberofbits}}]</code> {{text|&rarr; The bit can only hold -1 or 0, unsigned bit can hold 1 or 0.}}
+
* <code>...AS [_UNSIGNED] {{KW|_BIT}} [*{{Parameter|numberofbits}}]</code> {{discrete|&rarr; The bit can only hold -1 or 0, unsigned bit can hold 1 or 0.}}
  
* <code>{{KW|_BLEND}} [{{Parameter|imagehandle}}]</code>  {{text|&rarr; Turns on alpha blending.}}
+
* <code>{{KW|_BLEND}} [{{Parameter|imagehandle}}]</code>  {{discrete|&rarr; Turns on alpha blending.}}
  
* <code>{{Parameter|enabledflag}} = {{KW|_BLEND (function)|_BLEND}} [({{Parameter|imagehandle}})]</code>  {{text|&rarr; Returns -1 if alpha blending is enabled on the current image or a specific one, otherwise it returns 0.}}
+
* <code>{{Parameter|enabledflag}} = {{KW|_BLEND (function)|_BLEND}} [({{Parameter|imagehandle}})]</code>  {{discrete|&rarr; Returns -1 if alpha blending is enabled on the current image or a specific one, otherwise it returns 0.}}
  
 
* <code>{{Parameter|blue}} = {{KW|_BLUE}}({{Parameter|palette_index/32_bit_color}}[, {{Parameter|image_handle}}])</code>
 
* <code>{{Parameter|blue}} = {{KW|_BLUE}}({{Parameter|palette_index/32_bit_color}}[, {{Parameter|image_handle}}])</code>
Line 24: Line 24:
 
* <code>{{Parameter|blue_intensity%}} = {{KW|_BLUE32}}({{Parameter|color32value}})</code>
 
* <code>{{Parameter|blue_intensity%}} = {{KW|_BLUE32}}({{Parameter|color32value}})</code>
  
* <code>...AS [_UNSIGNED] {{KW|_BYTE}}</code> {{text|&rarr; A byte can hold 256 values from -128 to 127, unsigned byte can hold 0 to 255.}}
+
* <code>...AS [_UNSIGNED] {{KW|_BYTE}}</code> {{discrete|&rarr; A byte can hold 256 values from -128 to 127, unsigned byte can hold 0 to 255.}}
  
  
  
* <code>{{KW|_CLEARCOLOR}} {{Parameter|RGBsettings}}[, {{Parameter|ImageHandle}}]</code> {{text|&rarr; Defines the transparent color for all images or a specific one.}}
+
* <code>{{KW|_CLEARCOLOR}} {{Parameter|RGBsettings}}[, {{Parameter|ImageHandle}}]</code> {{discrete|&rarr; Defines the transparent color for all images or a specific one.}}
  
* <code>{{Parameter|colorvalue}} = {{KW|_CLEARCOLOR (function)|_CLEARCOLOR}} [({{Parameter|handle}})]</code> {{text|&rarr; Returns the current transparent color.}}
+
* <code>{{Parameter|colorvalue}} = {{KW|_CLEARCOLOR (function)|_CLEARCOLOR}} [({{Parameter|handle}})]</code> {{discrete|&rarr; Returns the current transparent color.}}
  
* <code>{{Parameter|result$}} = {{KW|_CLIPBOARD$}}</code>{{text|&rarr; Retrieve the contents of the clipboard.}}
+
* <code>{{Parameter|result$}} = {{KW|_CLIPBOARD$}}</code>{{discrete|&rarr; Retrieve the contents of the clipboard.}}
  
* <code>{{KW|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = {{Parameter|string_expression$}}</code>{{text|&rarr; Set the contents of the clipboard.}}
+
* <code>{{KW|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = {{Parameter|string_expression$}}</code>{{discrete|&rarr; Set the contents of the clipboard.}}
  
 
* <code>{{Parameter|status}} = {{KW|_CONNECTED}}({{Parameter|handle}})</code>
 
* <code>{{Parameter|status}} = {{KW|_CONNECTED}}({{Parameter|handle}})</code>
Line 40: Line 40:
 
* <code>{{Parameter|address$}} = {{KW|_CONNECTIONADDRESS}}({{Parameter|handle}})</code>
 
* <code>{{Parameter|address$}} = {{KW|_CONNECTIONADDRESS}}({{Parameter|handle}})</code>
  
* <code>{{Parameter|copyhandle&}} = {{KW|_COPYIMAGE}}& [({{Parameter|handle}})]</code> {{text|&rarr; Returns a handle to a copy of a image.}}
+
* <code>{{Parameter|copyhandle&}} = {{KW|_COPYIMAGE}}& [({{Parameter|handle}})]</code> {{discrete|&rarr; Returns a handle to a copy of a image.}}
  
 
* <code>{{KW|_COPYPALETTE}} [{{Parameter|sourceImageHandle&}}[, {{Parameter|destinationImageHandle&}}]]</code>
 
* <code>{{KW|_COPYPALETTE}} [{{Parameter|sourceImageHandle&}}[, {{Parameter|destinationImageHandle&}}]]</code>
Line 50: Line 50:
 
* <code>''result&'' = {{KW|_DEFAULTCOLOR}} [({{Parameter|imageHandle&}})]</code>
 
* <code>''result&'' = {{KW|_DEFAULTCOLOR}} [({{Parameter|imageHandle&}})]</code>
  
* <code>{{KW|_DEFINE}} {{Parameter|range or letter}}[, {{Parameter|range2 or letter2}}[, {{Parameter|range3 or letter3}}[, ...]]] AS [_UNSIGNED] datatype</code> {{text|&rarr; Defines variables starting with a letter or range of letters (like A-Z) as a datatype.}}
+
* <code>{{KW|_DEFINE}} {{Parameter|range or letter}}[, {{Parameter|range2 or letter2}}[, {{Parameter|range3 or letter3}}[, ...]]] AS [_UNSIGNED] datatype</code> {{discrete|&rarr; Defines variables starting with a letter as a datatype.}}
  
* <code>{{KW|_DELAY}} {{Parameter|seconds!}}</code> {{text|&rarr; Delays the program the specified number of seconds.}}
+
* <code>{{KW|_DELAY}} {{Parameter|seconds!}}</code> {{discrete|&rarr; Delays the program the specified number of seconds.}}
  
* <code>{{KW|_DEST}} {{{Parameter|handle | 0|1|2|3|...}}}</code> {{text|&rarr; Sets the drawing destination image.}}
+
* <code>{{KW|_DEST}} {{{Parameter|handle | 0|1|2|3|...}}}</code> {{discrete|&rarr; Sets the drawing destination image.}}
  
* <code>{{Parameter|handle}} = {{KW|_DEST}}</code> {{text|&rarr; Returns the current drawing destination image handle.}}
+
* <code>{{Parameter|handle}} = {{KW|_DEST}}</code> {{discrete|&rarr; Returns the current drawing destination image handle.}}
  
* <code>{{KW|_DISPLAY}}</code> {{text|&rarr; Turns off automatic display, while displaying the buffer to the screen.}}
+
* <code>{{KW|_DISPLAY}}</code> {{discrete|&rarr; Turns off automatic display, while displaying the buffer to the screen.}}
  
* <code>{{Parameter|displayedimage}} = {{KW|_DISPLAY (function)|_DISPLAY}}</code> {{text|&rarr; Returns the current displayed image.}}
+
* <code>{{Parameter|displayedimage}} = {{KW|_DISPLAY (function)|_DISPLAY}}</code> {{discrete|&rarr; Returns the current displayed image.}}
  
* <code>{{KW|_DONTBLEND}} [{{Parameter|imagehandle}}]</code>  {{text|&rarr; Turns off alpha blending.}}
+
* <code>{{KW|_DONTBLEND}} [{{Parameter|imagehandle}}]</code>  {{discrete|&rarr; Turns off alpha blending.}}
  
  
  
* <code>{{Parameter|erline}} = {{KW|_ERRORLINE}}</code> {{text|&rarr; In case of error returns the line that produced the error.}}
+
* <code>{{Parameter|erline}} = {{KW|_ERRORLINE}}</code> {{discrete|&rarr; In case of error returns the line that produced the error.}}
  
 
* <code>{{Parameter|quit%}} = {{KW|_EXIT}}</code>
 
* <code>{{Parameter|quit%}} = {{KW|_EXIT}}</code>
Line 74: Line 74:
 
* <code>...AS [_UNSIGNED] {{KW|_FLOAT}}</code>
 
* <code>...AS [_UNSIGNED] {{KW|_FLOAT}}</code>
  
* <code>{{KW|_FONT}} {{Parameter|Font_handle}}[, {{Parameter|Image_handle&}}]</code> {{text|&rarr; Set the font for the current image or a specified one.}}
+
* <code>{{KW|_FONT}} {{Parameter|Font_handle}}[, {{Parameter|Image_handle&}}]</code> {{discrete|&rarr; Set the font for the current image or a specified one.}}
  
* <code>{{Parameter|font_handle}} = {{KW|_FONT (function)|_FONT}} [({{Parameter|image_handle}})]</code> {{text|&rarr; Returns the font handle for the current image or a specified one.}}
+
* <code>{{Parameter|font_handle}} = {{KW|_FONT (function)|_FONT}} [({{Parameter|image_handle}})]</code> {{discrete|&rarr; Returns the font handle for the current image or a specified one.}}
  
* <code>{{Parameter|character_height_in_pixels}} = {{KW|_FONTHEIGHT}} [({{Parameter|font_handle}})]</code> {{text|&rarr; Returns the height of a font defined by font_handle.}}
+
* <code>{{Parameter|character_height_in_pixels}} = {{KW|_FONTHEIGHT}} [({{Parameter|font_handle}})]</code> {{discrete|&rarr; Returns the height of a font defined by font_handle.}}
  
* <code>{{Parameter|character_width_in_pixels}} = {{KW|_FONTWIDTH}} [({{Parameter|font_handle}})]</code> {{text|&rarr; Returns the width of a font defined by font_handle.}}
+
* <code>{{Parameter|character_width_in_pixels}} = {{KW|_FONTWIDTH}} [({{Parameter|font_handle}})]</code> {{discrete|&rarr; Returns the width of a font defined by font_handle.}}
  
* <code>{{KW|_FREEFONT}} {{Parameter|font_handle}}</code> {{text|&rarr; Closes the font defined by font_handle.}}
+
* <code>{{KW|_FREEFONT}} {{Parameter|font_handle}}</code> {{discrete|&rarr; Closes the font defined by font_handle.}}
  
* <code>{{KW|_FREEIMAGE}} [{{Parameter|handle}}]</code> {{text|&rarr; Closes the image defined by handle.}}
+
* <code>{{KW|_FREEIMAGE}} [{{Parameter|handle}}]</code> {{discrete|&rarr; Closes the image defined by handle.}}
  
 
* <code>{{Parameter|timerhandle}} = {{KW|_FREETIMER}}</code>
 
* <code>{{Parameter|timerhandle}} = {{KW|_FREETIMER}}</code>
Line 94: Line 94:
  
  
* <code>{{KW|GET (TCP/IP statement)|GET}} {{Parameter|#handle}}, ,{{Parameter|b$}}</code> {{text|&rarr; In QB64 gets a raw (unformatted) string from a open TCP/IP connection handle.}}
+
* <code>{{KW|GET (TCP/IP statement)|GET}} {{Parameter|#handle}}, ,{{Parameter|b$}}</code> {{discrete|&rarr; In QB64 gets a raw (unformatted) string from a open TCP/IP connection handle.}}
** <code>{{KW|GET (TCP/IP statement)|GET}} {{Parameter|#handle}}, ,{{Parameter|x%}}</code> {{text|&rarr; In QB64 gets a raw (unformatted) integer from a open TCP/IP connection handle.}}
+
** <code>{{KW|GET (TCP/IP statement)|GET}} {{Parameter|#handle}}, ,{{Parameter|x%}}</code> {{discrete|&rarr; In QB64 gets a raw (unformatted) integer from a open TCP/IP connection handle.}}
  
 
* <code>{{Parameter|green}} = {{KW|_GREEN}}({{Parameter|palette_index/32_bit_color}}[, {{Parameter|image_handle}}])</code>
 
* <code>{{Parameter|green}} = {{KW|_GREEN}}({{Parameter|palette_index/32_bit_color}}[, {{Parameter|image_handle}}])</code>
Line 103: Line 103:
  
  
* <code>{{Parameter|height&}} = {{KW|_HEIGHT}}({{Parameter|i&}})</code> {{text|&rarr; Returns the height of image i&.}}
+
* <code>{{Parameter|height&}} = {{KW|_HEIGHT}}({{Parameter|i&}})</code> {{discrete|&rarr; Returns the height of image i&.}}
  
  
  
* <code>{{KW|_ICON}} {{Parameter|handle}}</code> {{text|&rarr; Sets the program icon to the image defined by handle.}}
+
* <code>{{KW|_ICON}} {{Parameter|handle}}</code> {{discrete|&rarr; Sets the program icon to the image defined by handle.}}
  
* <code>{{KW|INPUT (TCP/IP statement)|INPUT}} {{Parameter|#handle}}, {{Parameter|data1}}[, {{Parameter|data2}}, ...etc]</code> {{text|&rarr; In QB64 retrieves data using the QB64 format from a open TCP/IP connection handle.}}
+
* <code>{{KW|INPUT (TCP/IP statement)|INPUT}} {{Parameter|#handle}}, {{Parameter|data1}}[, {{Parameter|data2}}, ...etc]</code> {{discrete|&rarr; In QB64 retrieves data using the QB64 format from a open TCP/IP connection handle.}}
  
 
* <code>...AS [_UNSIGNED] {{KW|_INTEGER64}}</code>
 
* <code>...AS [_UNSIGNED] {{KW|_INTEGER64}}</code>
Line 115: Line 115:
  
  
* <code>{{KW|_LIMIT}} ({{Parameter|FramesPerSecond%}})</code> {{text|&rarr; Limits the framerate of a loop.}}
+
* <code>{{KW|_LIMIT}} ({{Parameter|FramesPerSecond%}})</code> {{discrete|&rarr; Limits the framerate of a loop.}}
  
* <code>{{Parameter|font_handle}} = {{KW|_LOADFONT}}({{Parameter|ttf_filename$}}, {{Parameter|height}} [,"BOLD,ITALIC,UNDERLINE,DONTBLEND,MONOSPACE"])</code> {{text|&rarr; Loads a font and returns the handle to it.}}
+
* <code>{{Parameter|font_handle}} = {{KW|_LOADFONT}}({{Parameter|ttf_filename$}}, {{Parameter|height}} [,"BOLD,ITALIC,UNDERLINE,DONTBLEND,MONOSPACE"])</code> {{discrete|&rarr; Loads a font and returns the handle to it.}}
  
* <code>{{Parameter|handle&}} = {{KW|_LOADIMAGE}}& ({{Parameter|filename$}}[, {{Parameter|mode}}])</code> {{text|&rarr; Loads a image and returns the handle to it.}}
+
* <code>{{Parameter|handle&}} = {{KW|_LOADIMAGE}}& ({{Parameter|filename$}}[, {{Parameter|mode}}])</code> {{discrete|&rarr; Loads a image and returns the handle to it.}}
  
  
Line 131: Line 131:
 
* <code>{{Parameter|stringvalue$}} = {{KW|_MK$}}({{Parameter|numericaltype}}, {{Parameter|numbervalue}})</code>
 
* <code>{{Parameter|stringvalue$}} = {{KW|_MK$}}({{Parameter|numericaltype}}, {{Parameter|numbervalue}})</code>
  
* <code>{{Parameter|buttontriggered}} = {{KW|_MOUSEBUTTON}} ({{Parameter|Button%}})</code> {{text|&rarr; Returns -1 if the mouse button is triggered.}}
+
* <code>{{Parameter|buttontriggered}} = {{KW|_MOUSEBUTTON}} ({{Parameter|Button%}})</code> {{discrete|&rarr; Returns -1 if the mouse button is triggered.}}
  
* <code>{{KW|_MOUSEHIDE}}</code> {{text|&rarr; Hides the mouse.}}
+
* <code>{{KW|_MOUSEHIDE}}</code> {{discrete|&rarr; Hides the mouse.}}
  
* <code>{{Parameter|newmouseinput}} = {{KW|_MOUSEINPUT}}</code> {{text|&rarr; Returns -1 if there are new input from the mouse.}}
+
* <code>{{Parameter|newmouseinput}} = {{KW|_MOUSEINPUT}}</code> {{discrete|&rarr; Returns -1 if there are new input from the mouse.}}
  
* {{KW|_MOUSEMOVE}} ''x'', ''y''  {{text|&rarr; Moves the mouse pointer to a designated position.}}
+
* {{KW|_MOUSEMOVE}} ''x'', ''y''  {{discrete|&rarr; Moves the mouse pointer to a designated position.}}
  
 
* <code>{{Parameter|xmovement}} = {{KW|_MOUSEMOVEMENTX}}</code> <span style="color:#B0B0B0">&rarr; Returns the number of pixels in the x direction that the mouse has moved since the latest call. Also hides the mouse (you cannot exit by clicking the X button so make sure you have an alternative exit).</span>
 
* <code>{{Parameter|xmovement}} = {{KW|_MOUSEMOVEMENTX}}</code> <span style="color:#B0B0B0">&rarr; Returns the number of pixels in the x direction that the mouse has moved since the latest call. Also hides the mouse (you cannot exit by clicking the X button so make sure you have an alternative exit).</span>
  
* <code>{{Parameter|ymovement}} = {{KW|_MOUSEMOVEMENTY}}</code> {{text|&rarr; Returns the number of pixels in the y direction that the mouse has moved since the latest call. Also hides the mouse.}}
+
* <code>{{Parameter|ymovement}} = {{KW|_MOUSEMOVEMENTY}}</code> {{discrete|&rarr; Returns the number of pixels in the y direction that the mouse has moved since the latest call. Also hides the mouse.}}
  
* <code>{{KW|_MOUSESHOW}}</code> {{text|&rarr; Shows the mouse.}}
+
* <code>{{KW|_MOUSESHOW}}</code> {{discrete|&rarr; Shows the mouse.}}
  
 
* <code>{{Parameter|scroll%}} = {{KW|_MOUSEWHEEL}}</code>
 
* <code>{{Parameter|scroll%}} = {{KW|_MOUSEWHEEL}}</code>
  
* <code>{{Parameter|xposmouse}} = {{KW|_MOUSEX}}</code> {{text|&rarr; Returns the x position of the mouse.}}
+
* <code>{{Parameter|xposmouse}} = {{KW|_MOUSEX}}</code> {{discrete|&rarr; Returns the x position of the mouse.}}
  
* <code>{{Parameter|yposmouse}} = {{KW|_MOUSEY}}</code> {{text|&rarr; Returns the y position of the mouse.}}
+
* <code>{{Parameter|yposmouse}} = {{KW|_MOUSEY}}</code> {{discrete|&rarr; Returns the y position of the mouse.}}
  
  
  
* <code>{{Parameter|handle&}} = {{KW|_NEWIMAGE}}& ({{Parameter|width}}, {{Parameter|height}}[, {{Parameter|BPPmode}}])</code> {{text|&rarr; Creates and gives the handle to a new image.}}
+
* <code>{{Parameter|handle&}} = {{KW|_NEWIMAGE}}& ({{Parameter|width}}, {{Parameter|height}}[, {{Parameter|BPPmode}}])</code> {{discrete|&rarr; Creates and gives the handle to a new image.}}
  
  
Line 163: Line 163:
 
* <code>{{Parameter|host_handle}} = {{KW|_OPENHOST}}({{Parameter|stringargument}})</code>
 
* <code>{{Parameter|host_handle}} = {{KW|_OPENHOST}}({{Parameter|stringargument}})</code>
  
* <code>{{Parameter|osinfo$}} = {{KW|_OS$}}</code> {{text|&rarr; Returns a string representing the Operating System and if it is 32 or 64 bit.}}
+
* <code>{{Parameter|osinfo$}} = {{KW|_OS$}}</code> {{discrete|&rarr; Returns a string representing the Operating System and if it is 32 or 64 bit.}}
  
 
* <code>{{Parameter|color32value&}} = {{KW|_PALETTECOLOR (function)|_PALETTECOLOR}}({{Parameter|attribute_number&}}, {{Parameter|handle&}})</code>
 
* <code>{{Parameter|color32value&}} = {{KW|_PALETTECOLOR (function)|_PALETTECOLOR}}({{Parameter|attribute_number&}}, {{Parameter|handle&}})</code>
  
* <code>{{Parameter|BytesPerPixel&}} = {{KW|_PIXELSIZE}} ({{Parameter|imagehandle&}})</code> {{text|&rarr; Returns the number of bytes a pixel takes up in a certain image.}}
+
* <code>{{Parameter|BytesPerPixel&}} = {{KW|_PIXELSIZE}} ({{Parameter|imagehandle&}})</code> {{discrete|&rarr; Returns the number of bytes a pixel takes up in a certain image.}}
  
* <code>REDIM {{KW|_PRESERVE}} {{Parameter|Array(newelements%)}}</code>{{text|&rarr; Optional argument to REDIM used to preserve the contents of an array while re-dimensioning.}}
+
* <code>REDIM {{KW|_PRESERVE}} {{Parameter|Array(newelements%)}}</code>{{discrete|&rarr; Optional argument to REDIM used to preserve the contents of an array while re-dimensioning.}}
  
* <code>{{KW|PRINT (TCP/IP statement)|PRINT}} {{Parameter|#handle}}, {{Parameter|data}} [, {{Parameter|data2}}, ...etc]</code>{{text|&rarr; In QB64 sends data using the QB64 format to a open TCP/IP connection handle.}}
+
* <code>{{KW|PRINT (TCP/IP statement)|PRINT}} {{Parameter|#handle}}, {{Parameter|data}} [, {{Parameter|data2}}, ...etc]</code>{{discrete|&rarr; In QB64 sends data using the QB64 format to a open TCP/IP connection handle.}}
  
 
* <code>{{KW|_PRINTMODE}} {{Parameter|mode}}[, {{Parameter|image_handle}}]</code>
 
* <code>{{KW|_PRINTMODE}} {{Parameter|mode}}[, {{Parameter|image_handle}}]</code>
Line 177: Line 177:
 
* <code>{{Parameter|status%}} = {{KW|_PRINTMODE}} [({{Parameter|image_handle}})]</code>
 
* <code>{{Parameter|status%}} = {{KW|_PRINTMODE}} [({{Parameter|image_handle}})]</code>
  
* <code>{{KW|_PRINTSTRING}} ({{Parameter|column}}, {{Parameter|row}}), {{Parameter|text_to_print$}}[, {{Parameter|image_handle&}}]</code> {{text|&rarr; Prints text to the screen.}}
+
* <code>{{KW|_PRINTSTRING}} ({{Parameter|column}}, {{Parameter|row}}), {{Parameter|text_to_print$}}[, {{Parameter|image_handle&}}]</code> {{discrete|&rarr; Prints text to the screen.}}
  
 
* <code>{{Parameter|pixel_width}} = {{KW|_PRINTWIDTH}}({{Parameter|text_to_print$}}[, {{Parameter|image_handle&}}])</code>
 
* <code>{{Parameter|pixel_width}} = {{KW|_PRINTWIDTH}}({{Parameter|text_to_print$}}[, {{Parameter|image_handle&}}])</code>
  
* <code>{{KW|PUT (TCP/IP statement)|PUT}} {{Parameter|#handle}}, , {{Parameter|data}}</code> {{text|&rarr; In QB64; Transmits raw data to a open TCP/IP connection handle.}}
+
* <code>{{KW|PUT (TCP/IP statement)|PUT}} {{Parameter|#handle}}, , {{Parameter|data}}</code> {{discrete|&rarr; In QB64; Transmits raw data to a open TCP/IP connection handle.}}
  
* <code>{{KW|_PUTIMAGE}} [({{Parameter|destx}}, {{Parameter|desty}})][-({{Parameter|destx2}}, {{Parameter|desty2}})], [{{Parameter|srchandle}}], [{{Parameter|desthandle}}][,({{Parameter|srcx}}, {{Parameter|srcy}})][-({{Parameter|srcx2}}, {{Parameter|srcy2}})]</code> {{text|&rarr; Puts a image from a area of a source image to a area of a destination image.}}
+
* <code>{{KW|_PUTIMAGE}} [({{Parameter|destx}}, {{Parameter|desty}})][-({{Parameter|destx2}}, {{Parameter|desty2}})], [{{Parameter|srchandle}}], [{{Parameter|desthandle}}][,({{Parameter|srcx}}, {{Parameter|srcy}})][-({{Parameter|srcx2}}, {{Parameter|srcy2}})]</code> {{discrete|&rarr; Puts a image from a area of a source image to a area of a destination image.}}
  
  
Line 191: Line 191:
 
* <code>{{Parameter|red_intensity%}} = {{KW|_RED32}}({{Parameter|color32value}})</code>
 
* <code>{{Parameter|red_intensity%}} = {{KW|_RED32}}({{Parameter|color32value}})</code>
  
* <code>{{Parameter|colorindex}} = {{KW|_RGB}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}[, {{Parameter|image_handle}}])</code> {{text|&rarr; Returns the color index for a mix of Red, Green and Blue components.}}
+
* <code>{{Parameter|colorindex}} = {{KW|_RGB}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}[, {{Parameter|image_handle}}])</code> {{discrete|&rarr; Returns the color index for a mix of Red, Green and Blue components.}}
  
* <code>{{Parameter|color32}} = {{KW|_RGB32}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}})</code> {{text|&rarr; Returns the 32-bit color value for a mix of Red, Green and Blue components.}}
+
* <code>{{Parameter|color32}} = {{KW|_RGB32}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}})</code> {{discrete|&rarr; Returns the 32-bit color value for a mix of Red, Green and Blue components.}}
  
* <code>{{Parameter|colorindex}} = {{KW|_RGBA}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}, {{Parameter|alpha}}[, {{Parameter|image_handle}}])</code> {{text|&rarr; Returns the color index for a mix of Red, Green, Blue and alpha components.}}
+
* <code>{{Parameter|colorindex}} = {{KW|_RGBA}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}, {{Parameter|alpha}}[, {{Parameter|image_handle}}])</code> {{discrete|&rarr; Returns the color index for a mix of Red, Green, Blue and alpha components.}}
  
* <code>{{Parameter|color32}} = {{KW|_RGBA32}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}, {{Parameter|alpha}})</code> {{text|&rarr; Returns the 32-bit color value for a mix of Red, Green, Blue and alpha components.}}
+
* <code>{{Parameter|color32}} = {{KW|_RGBA32}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}, {{Parameter|alpha}})</code> {{discrete|&rarr; Returns the 32-bit color value for a mix of Red, Green, Blue and alpha components.}}
  
 
* <code>{{Parameter|roundedvalue}} = {{KW|_ROUND}}({{Parameter|value}})</code>
 
* <code>{{Parameter|roundedvalue}} = {{KW|_ROUND}}({{Parameter|value}})</code>
Line 253: Line 253:
 
* <code>{{Parameter|rate}} = {{KW|_SNDRATE}}</code> <span style="color:#B0B0B0">&rarr; Returns the sample frequency.</span>
 
* <code>{{Parameter|rate}} = {{KW|_SNDRATE}}</code> <span style="color:#B0B0B0">&rarr; Returns the sample frequency.</span>
  
* <code>{{KW|_SNDRAW}} {{Parameter|leftsample&}} [{{Parameter|rightsample&}}]</code> {{text|&rarr; Turns the speaker membrane in or out -1 to 1 (1 being fully out).}}
+
* <code>{{KW|_SNDRAW}} {{Parameter|leftsample&}} [{{Parameter|rightsample&}}]</code> {{discrete|&rarr; Turns the speaker membrane in or out -1 to 1 (1 being fully out).}}
  
* <code>{{Parameter|length#}} = {{KW|_SNDRAWLEN}}</code> {{text|&rarr; Returns the length in seconds of the sample.}}
+
* <code>{{Parameter|length#}} = {{KW|_SNDRAWLEN}}</code> {{discrete|&rarr; Returns the length in seconds of the sample.}}
  
* <code>{{KW|_SOURCE}} {{{Parameter|handle& | 0|1|2|3...}}}</code> {{text|&rarr; Sets the source image that information is retrieved from.}}
+
* <code>{{KW|_SOURCE}} {{{Parameter|handle& | 0|1|2|3...}}}</code> {{discrete|&rarr; Sets the source image that information is retrieved from.}}
  
* <code>{{Parameter|present_source&}} = {{KW|_SOURCE (function)|_SOURCE}}</code> {{text|&rarr; Returns the handle of the current source image.}}
+
* <code>{{Parameter|present_source&}} = {{KW|_SOURCE (function)|_SOURCE}}</code> {{discrete|&rarr; Returns the handle of the current source image.}}
  
  
  
* <code>{{Parameter|t}} = {{KW|TIMER}}({{Parameter|accuracy}})</code> {{text|&rarr; Returns the current timer value with a chosen accuracy (can be down to .001, which is millisecond accuracy).}}
+
* <code>{{Parameter|t}} = {{KW|TIMER}}({{Parameter|accuracy}})</code> {{discrete|&rarr; Returns the current timer value with a chosen accuracy (can be down to .001, which is millisecond accuracy).}}
  
* <code>{{KW|_TITLE}} {{Parameter|Text$}}</code> <{{text|&rarr; Sets the title of the program window.}}
+
* <code>{{KW|_TITLE}} {{Parameter|Text$}}</code> <{{discrete|&rarr; Sets the title of the program window.}}
  
* <code>...AS [{{KW|_UNSIGNED}}] datatype</code> {{text|&rarr; _UNSIGNED makes the datatype always positive, increases the maximum value of the datatype.}}
+
* <code>...AS [{{KW|_UNSIGNED}}] datatype</code> {{discrete|&rarr; _UNSIGNED makes the datatype always positive, increases the maximum value of the datatype.}}
  
  
  
* <code>{{Parameter|ImageWidth&}} = {{KW|_WIDTH (QB64)|_WIDTH}}({{Parameter|i&}})</code> {{text|&rarr; Returns the width of a image defined by i&.}}
+
* <code>{{Parameter|ImageWidth&}} = {{KW|_WIDTH (QB64)|_WIDTH}}({{Parameter|i&}})</code> {{discrete|&rarr; Returns the width of a image defined by i&.}}
  
  
 
{{PageNavigation}}
 
{{PageNavigation}}

Revision as of 02:06, 15 March 2012

In alphabetical order. GET/PUT/PRINT/INPUT reffer to TCP/IP. Keyword that syntax refers to is linked. A brief explanation in grey next to the syntax.

Best viewed fullscreen.


  • result& = _ALPHA(c&[, imageHandle&])
    → Returns the alpha opacity for the image specified or the current image.
  • result& = _ALPHA32(c&[, imageHandle&])
    → Returns the alpha opacity for the image specified or the current image.
  • _AUTODISPLAY
    → Turns on autodisplay if it was disabled using _DISPLAY.


  • ...AS [_UNSIGNED] _BIT [*numberofbits]
    → The bit can only hold -1 or 0, unsigned bit can hold 1 or 0.
  • _BLEND [imagehandle]
    → Turns on alpha blending.
  • enabledflag = _BLEND [(imagehandle)]
    → Returns -1 if alpha blending is enabled on the current image or a specific one, otherwise it returns 0.
  • blue = _BLUE(palette_index/32_bit_color[, image_handle])
  • blue_intensity% = _BLUE32(color32value)
  • ...AS [_UNSIGNED] _BYTE
    → A byte can hold 256 values from -128 to 127, unsigned byte can hold 0 to 255.


  • _CLEARCOLOR RGBsettings[, ImageHandle]
    → Defines the transparent color for all images or a specific one.
  • colorvalue = _CLEARCOLOR [(handle)]
    → Returns the current transparent color.
  • result$ = _CLIPBOARD$
    → Retrieve the contents of the clipboard.
  • _CLIPBOARD$ = string_expression$
    → Set the contents of the clipboard.
  • copyhandle& = _COPYIMAGE& [(handle)]
    → Returns a handle to a copy of a image.
  • _COPYPALETTE [sourceImageHandle&[, destinationImageHandle&]]
  • result = _CV(numericalType, stringValue$)


  • _DEFINE range or letter[, range2 or letter2[, range3 or letter3[, ...]]] AS [_UNSIGNED] datatype
    → Defines variables starting with a letter as a datatype.
  • _DELAY seconds!
    → Delays the program the specified number of seconds.
  • _DEST handle
    → Sets the drawing destination image.
  • handle = _DEST
    → Returns the current drawing destination image handle.
  • _DISPLAY
    → Turns off automatic display, while displaying the buffer to the screen.
  • displayedimage = _DISPLAY
    → Returns the current displayed image.
  • _DONTBLEND [imagehandle]
    → Turns off alpha blending.


  • erline = _ERRORLINE
    → In case of error returns the line that produced the error.


  • _FONT Font_handle[, Image_handle&]
    → Set the font for the current image or a specified one.
  • font_handle = _FONT [(image_handle)]
    → Returns the font handle for the current image or a specified one.
  • character_height_in_pixels = _FONTHEIGHT [(font_handle)]
    → Returns the height of a font defined by font_handle.
  • character_width_in_pixels = _FONTWIDTH [(font_handle)]
    → Returns the width of a font defined by font_handle.
  • _FREEFONT font_handle
    → Closes the font defined by font_handle.
  • _FREEIMAGE [handle]
    → Closes the image defined by handle.


  • GET #handle, ,b$
    → In QB64 gets a raw (unformatted) string from a open TCP/IP connection handle.
    • GET #handle, ,x%
      → In QB64 gets a raw (unformatted) integer from a open TCP/IP connection handle.
  • green = _GREEN(palette_index/32_bit_color[, image_handle])
  • green_intensity% = _GREEN32(color32value)


  • height& = _HEIGHT(i&)
    → Returns the height of image i&.


  • _ICON handle
    → Sets the program icon to the image defined by handle.
  • INPUT #handle, data1[, data2, ...etc]
    → In QB64 retrieves data using the QB64 format from a open TCP/IP connection handle.


  • _LIMIT (FramesPerSecond%)
    → Limits the framerate of a loop.
  • font_handle = _LOADFONT(ttf_filename$, height [,"BOLD,ITALIC,UNDERLINE,DONTBLEND,MONOSPACE"])
    → Loads a font and returns the handle to it.
  • handle& = _LOADIMAGE& (filename$[, mode])
    → Loads a image and returns the handle to it.


  • _MAPTRIANGLE (sx1, sy1)-(sx2, sy2)-(sx3, sy3), source&, TO (dx1, dy1)-(dx2, dy2)-(dx3, dy3)[, destination&]
  • stringvalue$ = _MK$(numericaltype, numbervalue)
  • buttontriggered = _MOUSEBUTTON (Button%)
    → Returns -1 if the mouse button is triggered.
  • newmouseinput = _MOUSEINPUT
    → Returns -1 if there are new input from the mouse.
  • _MOUSEMOVE x, y
    → Moves the mouse pointer to a designated position.
  • xmovement = _MOUSEMOVEMENTX → Returns the number of pixels in the x direction that the mouse has moved since the latest call. Also hides the mouse (you cannot exit by clicking the X button so make sure you have an alternative exit).
  • ymovement = _MOUSEMOVEMENTY
    → Returns the number of pixels in the y direction that the mouse has moved since the latest call. Also hides the mouse.
  • xposmouse = _MOUSEX
    → Returns the x position of the mouse.
  • yposmouse = _MOUSEY
    → Returns the y position of the mouse.


  • handle& = _NEWIMAGE& (width, height[, BPPmode])
    → Creates and gives the handle to a new image.


  • osinfo$ = _OS$
    → Returns a string representing the Operating System and if it is 32 or 64 bit.
  • BytesPerPixel& = _PIXELSIZE (imagehandle&)
    → Returns the number of bytes a pixel takes up in a certain image.
  • REDIM _PRESERVE Array(newelements%)
    → Optional argument to REDIM used to preserve the contents of an array while re-dimensioning.
  • PRINT #handle, data [, data2, ...etc]
    → In QB64 sends data using the QB64 format to a open TCP/IP connection handle.
  • _PRINTSTRING (column, row), text_to_print$[, image_handle&]
    → Prints text to the screen.
  • pixel_width = _PRINTWIDTH(text_to_print$[, image_handle&])
  • PUT #handle, , data
    → In QB64; Transmits raw data to a open TCP/IP connection handle.
  • _PUTIMAGE [(destx, desty)][-(destx2, desty2)], [srchandle], [desthandle][,(srcx, srcy)][-(srcx2, srcy2)]
    → Puts a image from a area of a source image to a area of a destination image.


  • red = _RED(palette_index/32_bit_color[, image_handle])
  • red_intensity% = _RED32(color32value)
  • colorindex = _RGB(red, green, blue[, image_handle])
    → Returns the color index for a mix of Red, Green and Blue components.
  • color32 = _RGB32(red, green, blue)
    → Returns the 32-bit color value for a mix of Red, Green and Blue components.
  • colorindex = _RGBA(red, green, blue, alpha[, image_handle])
    → Returns the color index for a mix of Red, Green, Blue and alpha components.
  • color32 = _RGBA32(red, green, blue, alpha)
    → Returns the 32-bit color value for a mix of Red, Green, Blue and alpha components.


  • _SETALPHA alpha&, [c& [TO c2&]] [, imageHandle&]
  • sound_handle& = _SNDOPEN (filename$, [capabilities$])
  • rate = _SNDRATE → Returns the sample frequency.
  • _SNDRAW leftsample& [rightsample&]
    → Turns the speaker membrane in or out -1 to 1 (1 being fully out).
  • length# = _SNDRAWLEN
    → Returns the length in seconds of the sample.
  • _SOURCE handle&
    → Sets the source image that information is retrieved from.
  • present_source& = _SOURCE
    → Returns the handle of the current source image.


  • t = TIMER(accuracy)
    → Returns the current timer value with a chosen accuracy (can be down to .001, which is millisecond accuracy).
  • _TITLE Text$ <
    → Sets the title of the program window.
  • ...AS [_UNSIGNED] datatype
    → _UNSIGNED makes the datatype always positive, increases the maximum value of the datatype.


  • ImageWidth& = _WIDTH(i&)
    → Returns the width of a image defined by i&.



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page