Difference between revisions of "Syntax Reference - QB64"

From QB64 Wiki
Jump to navigation Jump to search
imported>Stylin
(removed Timer (QB64) link)
imported>Cyperium
Line 5: Line 5:
  
  
* [[_AUTODISPLAY]] <span style="color:#808080">&rarr; Turns on autodisplay if it was disabled using _DISPLAY.</span>
+
* <code>{{KW|_AUTODISPLAY}}</code> <span style="color:#808080">&rarr; Turns on autodisplay if it was disabled using _DISPLAY.</span>
  
  
* BG = [[_BACKGROUNDCOLOR]] <span style="color:#808080">&rarr; Returns the current background color.</span>
+
* <code>{{Parameter|BG}} = {{KW|_BACKGROUNDCOLOR}}</code> <span style="color:#808080">&rarr; Returns the current background color.</span>
* ...AS [ _UNSIGNED ] [[_BIT]] [*numberofbits] <span style="color:#808080">&rarr; The bit can only hold -1 or 0, unsigned bit can hold 1 or 0.</span>
+
* <code>...AS [_UNSIGNED] {{KW|_BIT}} [*{{Parameter|numberofbits}}]</code> <span style="color:#808080">&rarr; The bit can only hold -1 or 0, unsigned bit can hold 1 or 0.</span>
* [[_BLEND]] [imagehandle]  <span style="color:#808080">&rarr; Turns on alpha blending.</span>
+
* <code>{{KW|_BLEND}} [{{Parameter|imagehandle}}]</code> <span style="color:#808080">&rarr; Turns on alpha blending.</span>
* enabledflag = [[_BLEND (function)|_BLEND]] [(imagehandle)]  <span style="color:#808080">&rarr; Returns -1 if alpha blending is enabled on the current image or a specific one, otherwise it returns 0.</span>
+
* <code>{{Parameter|enabledflag}} = {{KW|_BLEND (function)|_BLEND}} [({{Parameter|imagehandle}})]</code> <span style="color:#808080">&rarr; Returns -1 if alpha blending is enabled on the current image or a specific one, otherwise it returns 0.</span>
* blue = [[_BLUE]](palette_index/32_bit_color[, image_handle])
+
* <code>{{Parameter|blue}} = {{KW|_BLUE}}({{Parameter|palette_index/32_bit_color}}[, {{Parameter|image_handle}}])</code>
* blue_intensity% = [[_BLUE32]](color32value)
+
* <code>{{Parameter|blue_intensity%}} = {{KW|_BLUE32}}({{Parameter|color32value}})</code>
* ...AS [ _UNSIGNED ] [[_BYTE]] <span style="color:#808080">&rarr; A byte can hold 256 values from -128 to 127, unsigned byte can hold 0 to 255.</span>
+
* <code>...AS [_UNSIGNED] {{KW|_BYTE}}</code> <span style="color:#808080">&rarr; A byte can hold 256 values from -128 to 127, unsigned byte can hold 0 to 255.</span>
  
  
* [[_CLEARCOLOR]] RGBsettings[, ImageHandle] <span style="color:#808080">&rarr; Defines the transparent color for all images or a specific one.</span>
+
* <code>{{KW|_CLEARCOLOR}} {{Parameter|RGBsettings}}[, {{Parameter|ImageHandle}}]</code> <span style="color:#808080">&rarr; Defines the transparent color for all images or a specific one.</span>
* colorvalue = [[_CLEARCOLOR (function)|_CLEARCOLOR]] [(handle)] <span style="color:#808080">&rarr; Returns the current transparent color.</span>
+
* <code>{{Parameter|colorvalue}} = {{KW|_CLEARCOLOR (function)|_CLEARCOLOR}} [({{Parameter|handle}})]</code> <span style="color:#808080">&rarr; Returns the current transparent color.</span>
* status = [[_CONNECTED]](handle)
+
* <code>{{Parameter|status}} = {{KW|_CONNECTED}}({{Parameter|handle}})</code>
* address$ = [[_CONNECTIONADDRESS]](handle)
+
* <code>{{Parameter|address$}} = {{KW|_CONNECTIONADDRESS}}({{Parameter|handle}})</code>
* copyhandle& = [[_COPYIMAGE]]& [(handle)] <span style="color:#808080">&rarr; Returns a handle to a copy of a image.</span>
+
* <code>{{Parameter|copyhandle&}} = {{KW|_COPYIMAGE}}& [({{Parameter|handle}})]</code> <span style="color:#808080">&rarr; Returns a handle to a copy of a image.</span>
  
  
* [[_DEFINE]] range or letter[, range2 or letter2[, range3 or letter3[, ...]]] AS [ _UNSIGNED ] datatype <span style="color:#808080">&rarr; Defines variables starting with a letter or range of letters (like A-Z) as a datatype.</span>
+
* <code>{{KW|_DEFINE}} {{Parameter|range or letter}}[, {{Parameter|range2 or letter2}}[, {{Parameter|range3 or letter3}}[, ...]]] AS [_UNSIGNED] datatype</code> <span style="color:#808080">&rarr; Defines variables starting with a letter or range of letters (like A-Z) as a datatype.</span>
* [[_DELAY]] seconds! <span style="color:#808080">&rarr; Delays the program the specified number of seconds.</span>
+
* <code>{{KW|_DELAY}} {{Parameter|seconds!}}</code> <span style="color:#808080">&rarr; Delays the program the specified number of seconds.</span>
* [[_DEST]] {handle | 0|1|2|3|...} <span style="color:#808080">&rarr; Sets the drawing destination image.</span>
+
* <code>{{KW|_DEST}} {{{Parameter|handle | 0|1|2|3|...}}}</code> <span style="color:#808080">&rarr; Sets the drawing destination image.</span>
* handle = [[_DEST]] <span style="color:#808080">&rarr; Returns the current drawing destination image handle.</span>
+
* <code>{{Parameter|handle}} = {{KW|_DEST}}</code> <span style="color:#808080">&rarr; Returns the current drawing destination image handle.</span>
* [[_DISPLAY]] <span style="color:#808080">&rarr; Turns off automatic display, while displaying the buffer to the screen.</span>
+
* <code>{{KW|_DISPLAY}}</code> <span style="color:#808080">&rarr; Turns off automatic display, while displaying the buffer to the screen.</span>
* displayedimage = [[_DISPLAY (function)|_DISPLAY]] <span style="color:#808080">&rarr; Returns the current displayed image.</span>
+
* <code>{{Parameter|displayedimage}} = {{KW|_DISPLAY (function)|_DISPLAY}}</code> <span style="color:#808080">&rarr; Returns the current displayed image.</span>
* [[_DONTBLEND]] [imagehandle]  <span style="color:#808080">&rarr; Turns off alpha blending.</span>
+
* <code>{{KW|_DONTBLEND}} [{{Parameter|imagehandle}}]</code> <span style="color:#808080">&rarr; Turns off alpha blending.</span>
  
  
* erline = [[_ERRORLINE]] <span style="color:#808080">&rarr; In case of error returns the line that produced the error.</span>
+
* <code>{{Parameter|erline}} = {{KW|_ERRORLINE}}</code> <span style="color:#808080">&rarr; In case of error returns the line that produced the error.</span>
  
  
* ...AS [ _UNSIGNED ] [[_FLOAT]]
+
* <code>...AS [_UNSIGNED] {{KW|_FLOAT}}</code>
* [[_FONT]] Font_handle[, Image_handle&] <span style="color:#808080">&rarr; Set the font for the current image or a specified one.</span>
+
* <code>{{KW|_FONT}} {{Parameter|Font_handle}}[, {{Parameter|Image_handle&}}]</code> <span style="color:#808080">&rarr; Set the font for the current image or a specified one.</span>
* font_handle = [[_FONT (function)|_FONT]] [(image_handle)] <span style="color:#808080">&rarr; Returns the font handle for the current image or a specified one.</span>
+
* <code>{{Parameter|font_handle}} = {{KW|_FONT (function)|_FONT}} [({{Parameter|image_handle}})]</code> <span style="color:#808080">&rarr; Returns the font handle for the current image or a specified one.</span>
* character_height_in_pixels = [[_FONTHEIGHT]] [(font_handle)] <span style="color:#808080">&rarr; Returns the height of a font defined by font_handle.</span>
+
* <code>{{Parameter|character_height_in_pixels}} = {{KW|_FONTHEIGHT}} [({{Parameter|font_handle}})]</code> <span style="color:#808080">&rarr; Returns the height of a font defined by font_handle.</span>
* character_width_in_pixels = [[_FONTWIDTH]] [(font_handle)] <span style="color:#808080">&rarr; Returns the width of a font defined by font_handle.</span>
+
* <code>{{Parameter|character_width_in_pixels}} = {{KW|_FONTWIDTH}} [({{Parameter|font_handle}})]</code> <span style="color:#808080">&rarr; Returns the width of a font defined by font_handle.</span>
* [[_FREEFONT]] font_handle <span style="color:#808080">&rarr; Closes the font defined by font_handle.</span>
+
* <code>{{KW|_FREEFONT}} {{Parameter|font_handle}}</code> <span style="color:#808080">&rarr; Closes the font defined by font_handle.</span>
* [[_FREEIMAGE]] [handle] <span style="color:#808080">&rarr; Closes the image defined by handle.</span>
+
* <code>{{KW|_FREEIMAGE}} [{{Parameter|handle}}]</code> <span style="color:#808080">&rarr; Closes the image defined by handle.</span>
  
  
* [[GET (TCP/IP statement)|GET]] #handle, ,b$ <span style="color:#808080">&rarr; In QB64 gets a raw (unformatted) string from a open TCP/IP connection handle.</span>
+
* <code>{{KW|GET (TCP/IP statement)|GET}} {{Parameter|#handle}}, ,{{Parameter|b$}}</code> <span style="color:#808080">&rarr; In QB64 gets a raw (unformatted) string from a open TCP/IP connection handle.</span>
** [[GET (TCP/IP statement)|GET]] #handle, ,x% <span style="color:#808080">&rarr; In QB64 gets a raw (unformatted) integer from a open TCP/IP connection handle.</span>
+
** <code>{{KW|GET (TCP/IP statement)|GET}} {{Parameter|#handle}}, ,{{Parameter|x%}}</code> <span style="color:#808080">&rarr; In QB64 gets a raw (unformatted) integer from a open TCP/IP connection handle.</span>
* green = [[_GREEN]](palette_index/32_bit_color[, image_handle])
+
* <code>{{Parameter|green}} = {{KW|_GREEN}}({{Parameter|palette_index/32_bit_color}}[, {{Parameter|image_handle}}])</code>
* green_intensity% = [[_GREEN32]](color32value)
+
* <code>{{Parameter|green_intensity%}} = {{KW|_GREEN32}}({{Parameter|color32value}})</code>
  
  
* height& = [[_HEIGHT]](i&) <span style="color:#808080">&rarr; Returns the height of image i&.</span>
+
* <code>{{Parameter|height&}} = {{KW|_HEIGHT}}({{Parameter|i&}})</code> <span style="color:#808080">&rarr; Returns the height of image i&.</span>
  
  
* [[_ICON]] handle <span style="color:#808080">&rarr; Sets the program icon to the image defined by handle.</span>
+
* <code>{{KW|_ICON}} {{Parameter|handle}}</code> <span style="color:#808080">&rarr; Sets the program icon to the image defined by handle.</span>
* [[INPUT (TCP/IP statement)|INPUT]] #handle, data1[, data2, ...etc] <span style="color:#808080">&rarr; In QB64 retrieves data using the QB64 format from a open TCP/IP connection handle.</span>
+
* <code>{{KW|INPUT (TCP/IP statement)|INPUT}} {{Parameter|#handle}}, {{Parameter|data1}}[, {{Parameter|data2}}, ...etc]</code> <span style="color:#808080">&rarr; In QB64 retrieves data using the QB64 format from a open TCP/IP connection handle.</span>
* ...AS [_UNSIGNED] [[_INTEGER64]]
+
* <code>...AS [_UNSIGNED] {{KW|_INTEGER64}}</code>
  
  
* [[_LIMIT]] (FramesPerSecond%) <span style="color:#808080">&rarr; Limits the framerate of a loop.</span>
+
* <code>{{KW|_LIMIT}} ({{Parameter|FramesPerSecond%}})</code> <span style="color:#808080">&rarr; Limits the framerate of a loop.</span>
* font_handle = [[_LOADFONT]](ttf_filename$,height [,"BOLD,ITALIC,UNDERLINE,DONTBLEND,MONOSPACE"]) <span style="color:#808080">&rarr; Loads a font and returns the handle to it.</span>
+
* <code>{{Parameter|font_handle}} = {{KW|_LOADFONT}}({{Parameter|ttf_filename$}}, {{Parameter|height}} [,"BOLD,ITALIC,UNDERLINE,DONTBLEND,MONOSPACE"])</code> <span style="color:#808080">&rarr; Loads a font and returns the handle to it.</span>
* handle& = [[_LOADIMAGE]]& (filename$[, mode]) <span style="color:#808080">&rarr; Loads a image and returns the handle to it.</span>
+
* <code>{{Parameter|handle&}} = {{KW|_LOADIMAGE}}& ({{Parameter|filename$}}[, {{Parameter|mode}}])</code> <span style="color:#808080">&rarr; Loads a image and returns the handle to it.</span>
  
  
* buttontriggered = [[_MOUSEBUTTON]] (Button%) <span style="color:#808080">&rarr; Returns -1 if the mouse button is triggered.</span>
+
* <code>{{Parameter|buttontriggered}} = {{KW|_MOUSEBUTTON}} ({{Parameter|Button%}})</code> <span style="color:#808080">&rarr; Returns -1 if the mouse button is triggered.</span>
* [[_MOUSEHIDE]] <span style="color:#808080">&rarr; Hides the mouse.</span>
+
* <code>{{KW|_MOUSEHIDE}}</code> <span style="color:#808080">&rarr; Hides the mouse.</span>
* newmouseinput = [[_MOUSEINPUT]] <span style="color:#808080">&rarr; Returns -1 if there are new input from the mouse.</span>
+
* <code>{{Parameter|newmouseinput}} = {{KW|_MOUSEINPUT}}</code> <span style="color:#808080">&rarr; Returns -1 if there are new input from the mouse.</span>
* [[_MOUSESHOW]] <span style="color:#808080">&rarr; Shows the mouse.</span>
+
* <code>{{KW|_MOUSESHOW}}</code> <span style="color:#808080">&rarr; Shows the mouse.</span>
* xposmouse = [[_MOUSEX]] <span style="color:#808080">&rarr; Returns the x position of the mouse.</span>
+
* <code>{{Parameter|xposmouse}} = {{KW|_MOUSEX}}</code> <span style="color:#808080">&rarr; Returns the x position of the mouse.</span>
* yposmouse = [[_MOUSEY]] <span style="color:#808080">&rarr; Returns the y position of the mouse.</span>
+
* <code>{{Parameter|yposmouse}} = {{KW|_MOUSEY}}</code> <span style="color:#808080">&rarr; Returns the y position of the mouse.</span>
  
  
* handle& = [[_NEWIMAGE]]& (width, height[, BPPmode]) <span style="color:#808080">&rarr; Creates and gives the handle to a new image.</span>
+
* <code>{{Parameter|handle&}} = {{KW|_NEWIMAGE}}& ({{Parameter|width}}, {{Parameter|height}}[, {{Parameter|BPPmode}}])</code> <span style="color:#808080">&rarr; Creates and gives the handle to a new image.</span>
  
  
* client_handle = [[_OPENCLIENT]](stringargument)
+
* <code>{{Parameter|client_handle}} = {{KW|_OPENCLIENT}}({{Parameter|stringargument}})</code>
* connect_handle = [[_OPENCONNECTION]](host_handle)
+
* <code>{{Parameter|connect_handle}} = {{KW|_OPENCONNECTION}}({{Parameter|host_handle}})</code>
* host_handle = [[_OPENHOST]](stringargument)
+
* <code>{{Parameter|host_handle}} = {{KW|_OPENHOST}}({{Parameter|stringargument}})</code>
  
  
* color32value& = [[_PALETTECOLOR (function)|_PALETTECOLOR]](attribute_number&, handle&)
+
* <code>{{Parameter|color32value&}} = {{KW|_PALETTECOLOR (function)|_PALETTECOLOR}}({{Parameter|attribute_number&}}, {{Parameter|handle&}})</code>
* BytesPerPixel& = [[_PIXELSIZE]] (imagehandle&) <span style="color:#808080">&rarr; Returns the number of bytes a pixel takes up in a certain image.</span>
+
* <code>{{Parameter|BytesPerPixel&}} = {{KW|_PIXELSIZE}} ({{Parameter|imagehandle&}})</code> <span style="color:#808080">&rarr; Returns the number of bytes a pixel takes up in a certain image.</span>
* [[PRINT (TCP/IP statement)|PRINT]] #handle, data [,data2, ...etc] <span style="color:#808080">&rarr; In QB64 sends data using the QB64 format to a open TCP/IP connection handle.</span>
+
* <code>{{KW|PRINT (TCP/IP statement)|PRINT}} {{Parameter|#handle}}, {{Parameter|data}} [, {{Parameter|data2}}, ...etc]</code> <span style="color:#808080">&rarr; In QB64 sends data using the QB64 format to a open TCP/IP connection handle.</span>
* [[_PRINTMODE]] mode[,image_handle]
+
* <code>{{KW|_PRINTMODE}} {{Parameter|mode}}[, {{Parameter|image_handle}}]</code>
* status% = [[_PRINTMODE]] [(image_handle)]
+
* <code>{{Parameter|status%}} = {{KW|_PRINTMODE}} [({{Parameter|image_handle}})]</code>
* [[_PRINTSTRING]] (column,row), text_to_print$[,image_handle&] <span style="color:#808080">&rarr; Prints text to the screen.</span>
+
* <code>{{KW|_PRINTSTRING}} ({{Parameter|column}}, {{Parameter|row}}), {{Parameter|text_to_print$}}[, {{Parameter|image_handle&}}]</code> <span style="color:#808080">&rarr; Prints text to the screen.</span>
* pixel_width = [[_PRINTWIDTH]](text_to_print$[,image_handle&])
+
* <code>{{Parameter|pixel_width}} = {{KW|_PRINTWIDTH}}({{Parameter|text_to_print$}}[, {{Parameter|image_handle&}}])</code>
* [[PUT (TCP/IP statement)|PUT]] #handle, , data <span style="color:#808080">&rarr; In QB64; Transmits raw data to a open TCP/IP connection handle.</span>
+
* <code>{{KW|PUT (TCP/IP statement)|PUT}} {{Parameter|#handle}}, , {{Parameter|data}}</code> <span style="color:#808080">&rarr; In QB64; Transmits raw data to a open TCP/IP connection handle.</span>
* [[_PUTIMAGE]] [(srcx, srcy)][-(srcx2, srcy2)], [srchandle], [desthandle][,(destx, desty)][-(destx2, desty2)] <span style="color:#808080">&rarr; Puts a image from a area of a source image to a area of a destination image.</span>
+
* <code>{{KW|_PUTIMAGE}} [({{Parameter|srcx}}, {{Parameter|srcy}})][-({{Parameter|srcx2}}, {{Parameter|srcy2}})], [{{Parameter|srchandle}}], [{{Parameter|desthandle}}][,({{Parameter|destx}}, {{Parameter|desty}})][-({{Parameter|destx2}}, {{Parameter|desty2}})]</code> <span style="color:#808080">&rarr; Puts a image from a area of a source image to a area of a destination image.</span>
  
  
* red = [[_RED]](palette_index/32_bit_color[, image_handle])
+
* <code>{{Parameter|red}} = {{KW|_RED}}({{Parameter|palette_index/32_bit_color}}[, {{Parameter|image_handle}}])</code>
* red_intensity% = [[_RED32]](color32value)
+
* <code>{{Parameter|red_intensity%}} = {{KW|_RED32}}({{Parameter|color32value}})</code>
* colorindex = [[_RGB]](red, green, blue[, image_handle]) <span style="color:#808080">&rarr; Returns the color index for a mix of Red, Green and Blue components.</span>
+
* <code>{{Parameter|colorindex}} = {{KW|_RGB}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}[, {{Parameter|image_handle}}])</code> <span style="color:#808080">&rarr; Returns the color index for a mix of Red, Green and Blue components.</span>
* color32 = [[_RGB32]](red, green, blue) <span style="color:#808080">&rarr; Returns the 32-bit color value for a mix of Red, Green and Blue components.</span>
+
* <code>{{Parameter|color32}} = {{KW|_RGB32}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}})</code> <span style="color:#808080">&rarr; Returns the 32-bit color value for a mix of Red, Green and Blue components.</span>
* colorindex = [[_RGBA]](red, green, blue, alpha[, image_handle]) <span style="color:#808080">&rarr; Returns the color index for a mix of Red, Green, Blue and alpha components.</span>
+
* <code>{{Parameter|colorindex}} = {{KW|_RGBA}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}, {{Parameter|alpha}}[, {{Parameter|image_handle}}])</code> <span style="color:#808080">&rarr; Returns the color index for a mix of Red, Green, Blue and alpha components.</span>
* color32 = [[_RGBA32]](red, green, blue, alpha) <span style="color:#808080">&rarr; Returns the 32-bit color value for a mix of Red, Green, Blue and alpha components.</span>
+
* <code>{{Parameter|color32}} = {{KW|_RGBA32}}({{Parameter|red}}, {{Parameter|green}}, {{Parameter|blue}}, {{Parameter|alpha}})</code> <span style="color:#808080">&rarr; Returns the 32-bit color value for a mix of Red, Green, Blue and alpha components.</span>
* roundedvalue = [[_ROUND]](value)
+
* <code>{{Parameter|roundedvalue}} = {{KW|_ROUND}}({{Parameter|value}})</code>
  
  
* [[_SNDBAL]] handle&[,x!][, y!][,z!]
+
* <code>{{KW|_SNDBAL}} {{Parameter|handle&}}[, {{Parameter|x!}}][, {{Parameter|y!}}][, {{Parameter|z!}}]</code>
* [[_SNDCLOSE]] handle&
+
* <code>{{KW|_SNDCLOSE}} {{Parameter|handle&}}</code>
* new_handle& = [[_SNDCOPY]]& (handle&)
+
* <code>{{Parameter|new_handle&}} = {{KW|_SNDCOPY}}& ({{Parameter|handle&}})</code>
* seconds = [[_SNDGETPOS]]!(handle&)
+
* <code>{{Parameter|seconds}} = {{KW|_SNDGETPOS}}!({{Parameter|handle&}})</code>
* lenseconds = [[_SNDLEN]]! (handle&)
+
* <code>{{Parameter|lenseconds}} = {{KW|_SNDLEN}}! ({{Parameter|handle&}})</code>
* [[_SNDLIMIT]] handle&, limit!
+
* <code>{{KW|_SNDLIMIT}} {{Parameter|handle&}}, {{Parameter|limit!}}</code>
* [[_SNDLOOP]] handle&
+
* <code>{{KW|_SNDLOOP}} {{Parameter|handle&}}</code>
* sound_handle& = [[_SNDOPEN]] (filename$,[capabilities$])
+
* <code>{{Parameter|sound_handle&}} = {{KW|_SNDOPEN}} ({{Parameter|filename$}}, [{{Parameter|capabilities$}}])</code>
* [[_SNDPAUSE]] handle&
+
* <code>{{KW|_SNDPAUSE}} {{Parameter|handle&}}
* paused% = [[_SNDPAUSED]] (handle&)
+
* <code>{{Parameter|paused%}} = {{KW|_SNDPAUSED}} ({{Parameter|handle&}})</code>
* [[_SNDPLAY]] handle&
+
* <code>{{KW|_SNDPLAY}} {{Parameter|handle&}}</code>
* [[_SNDPLAYCOPY]] handle&[, volume!]
+
* <code>{{KW|_SNDPLAYCOPY}} {{Parameter|handle&}}[, {{Parameter|volume!}}]</code>
* [[_SNDPLAYFILE]] filename$[, sync%][, volume!]
+
* <code>{{KW|_SNDPLAYFILE}} {{Parameter|filename$}}[, {{Parameter|sync%}}][, {{Parameter|volume!}}]</code>
* playing% = [[_SNDPLAYING]]% (handle&)
+
* <code>{{Parameter|playing%}} = {{KW|_SNDPLAYING}}% ({{Parameter|handle&}})</code>
* [[_SNDSETPOS]] handle&, position!
+
* <code>{{KW|_SNDSETPOS}} {{Parameter|handle&}}, {{Parameter|position!}}</code>
* [[_SNDSTOP]] handle&
+
* <code>{{KW|_SNDSTOP}} {{Parameter|handle&}}
* [[_SNDVOL]] handle&, volume!
+
* <code>{{KW|_SNDVOL}} {{Parameter|handle&}}, {{Parameter|volume!}}</code>
* [[_SOURCE]] {handle& | 0|1|2|3...} <span style="color:#808080">&rarr; Sets the source image that information is retrieved from.</span>
+
* <code>{{KW|_SOURCE}} {{{Parameter|handle& | 0|1|2|3...}}}</code> <span style="color:#808080">&rarr; Sets the source image that information is retrieved from.</span>
* present_source& = [[_SOURCE (function)|_SOURCE]] <span style="color:#808080">&rarr; Returns the handle of the current source image.</span>
+
* <code>{{Parameter|present_source&}} = {{KW|_SOURCE (function)|_SOURCE}}</code> <span style="color:#808080">&rarr; Returns the handle of the current source image.</span>
  
  
* t = [[TIMER]](accuracy) <span style="color:#808080">&rarr; Returns the current timer value with a chosen accuracy (can be down to .001, which is millisecond accuracy).</span>
+
* <code>{{Parameter|t}} = {{KW|TIMER}}({{Parameter|accuracy}})</code> <span style="color:#808080">&rarr; Returns the current timer value with a chosen accuracy (can be down to .001, which is millisecond accuracy).</span>
* [[_TITLE]] Text$ <span style="color:#808080">&rarr; Sets the title of the program window.</span>
+
* <code>{{KW|_TITLE}} {{Parameter|Text$}}</code> <span style="color:#808080">&rarr; Sets the title of the program window.</span>
* ...AS [ [[_UNSIGNED]] ] datatype <span style="color:#808080">&rarr; _UNSIGNED makes the datatype always positive, increases the maximum value of the datatype.</span>
+
* <code>...AS [{{KW|_UNSIGNED}}] datatype</code> <span style="color:#808080">&rarr; _UNSIGNED makes the datatype always positive, increases the maximum value of the datatype.</span>
  
  
* ImageWidth& = [[_WIDTH (QB64)|_WIDTH]](i&) <span style="color:#808080">&rarr; Returns the width of a image defined by i&.</span>
+
* <code>{{Parameter|ImageWidth&}} = {{KW|_WIDTH (QB64)|_WIDTH}}({{Parameter|i&}}) <span style="color:#808080">&rarr; Returns the width of a image defined by i&.</span>

Revision as of 02:24, 31 January 2010

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.


  • _AUTODISPLAY → Turns on autodisplay if it was disabled using _DISPLAY.


  • BG = _BACKGROUNDCOLOR → Returns the current background color.
  • ...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.
  • status = _CONNECTED(handle)
  • address$ = _CONNECTIONADDRESS(handle)
  • copyhandle& = _COPYIMAGE& [(handle)] → Returns a handle to a copy of a image.


  • _DEFINE range or letter[, range2 or letter2[, range3 or letter3[, ...]]] AS [_UNSIGNED] datatype → Defines variables starting with a letter or range of letters (like A-Z) 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.


  • ...AS [_UNSIGNED] _FLOAT
  • _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.
  • ...AS [_UNSIGNED] _INTEGER64


  • _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.


  • buttontriggered = _MOUSEBUTTON (Button%) → Returns -1 if the mouse button is triggered.
  • _MOUSEHIDE → Hides the mouse.
  • newmouseinput = _MOUSEINPUT → Returns -1 if there are new input from the mouse.
  • _MOUSESHOW → Shows 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.



  • color32value& = _PALETTECOLOR(attribute_number&, handle&)
  • BytesPerPixel& = _PIXELSIZE (imagehandle&) → Returns the number of bytes a pixel takes up in a certain image.
  • PRINT #handle, data [, data2, ...etc] → In QB64 sends data using the QB64 format to a open TCP/IP connection handle.
  • _PRINTMODE mode[, image_handle]
  • status% = _PRINTMODE [(image_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 [(srcx, srcy)][-(srcx2, srcy2)], [srchandle], [desthandle][,(destx, desty)][-(destx2, desty2)] → 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.
  • roundedvalue = _ROUND(value)



  • 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&.