Console,command,AT,521,"AT x, y","Moves the text cursor to the specified position [x, y]. x and y are in pixels."
Console,command,BEEP,522,"BEEP","Generates a beep sound."
Console,command,CLS,524,"CLS ","Clears the screen."
Console,command,FORM,525,"f = FORM(formMap)","Creates a form object f from a MAP variable formMap. Form object f gives access to the following GUI elements:"
Console,command,INPUT,527,"INPUT [prompt,|;] var[, var [, ...]]","Reads text from keyboard and stores it in the variable var. The string prompt is printed on the screen. If prompt is followed by a ;, a question mark and a space are printed additionally. If you want to input two or more variables, the input needs to be separated with ,."
Console,command,LINEINPUT,528,"LINEINPUT [#fileN,] var","Reads a whole text line from file or console and stores it in the string var. If a file handle #fileN is specified, LINEINPUT will read from the corresponding file otherwise it will read from the console."
Console,command,LINPUT,529,"LINPUT [#fileN,] var","Reads a whole text line from file or console and stores it in the string var. If a file handle #fileN is specified, LINPUT will read from the corresponding file otherwise it will read from the console. LINPUT has the same function as LINEINPUT."
Console,command,LOCATE,530,"LOCATE row, column","Moves the console (text-mode) cursor to the specified position. row and column are in text-mode character cells."
Console,command,LOGPRINT,531,"LOGPRINT ...","Prints to stderr. The syntax is the same as the command PRINT. LOGPRINT can be used to print log messages to a different output."
Console,command,NOSOUND,532,"NOSOUND","Stop background sound and clear the sound queue."
Console,command,PEN,533,"PEN ON|OFF","Enables/Disables the pen/mouse/tap mechanism. See function n = PEN(value) for information on how to read data from tap, mouse or pen."
Console,command,PLAY,534,"PLAY string","Play musical notes, a mp3 or ogg sound file. The music string is composed of the following building blocks:"
Console,command,PRINT,535,"PRINT [#file] [USING [format];] [expr|str [,|; [expr|str] ...]","Display numbers, strings or values of expressions. The symbol ? can be used instead of keyword PRINT. You can use USG instead of USING."
Console,command,SOUND,536,"SOUND freq, dur [, vol] [BG]","Plays a sound with the frequency freg in Hz for a duration dur in milliseconds. The optional parameter vol controls the volume of the sound. Volume is in the range from 0 to 100, where 100 is maximum volume. If the optional parameter BG is given, the sound will play in the background: SmallBASIC will not wait with program execution until the sound has finished."
Console,function,CAT,538,"s = CAT (x)","Returns an escape code to format a string. The values of x are listed in the following table:"
Console,function,DEFINEKEY,1015,"DEFINEKEY k, sub","Binds a keycode k to a user defined sub routine sub. When the key is pressed, the corresponding sub routine will be called. To unbind the keycode definition pass 0 as the sub argument."
Console,function,INKEY,539,"INKEY","Returns the last key-code in keyboard buffer, or an empty string if there are no keys. Special key-codes like the function-keys are returned as 2-byte string."
Console,function,TAB,540,"s = TAB (n)","Moves cursor position to the nth column. the return value s contains the escape sequence for moving the cursor."
Data,command,APPEND,581,"APPEND a, var1 [, var2 [, ..., varN]]","Inserts the values var1 to varN at the end of the array a. var1 to varN can be any data type."
Data,command,DELETE,542,"DELETE A, idx [, count]","Deletes count elements at position idx of array A."
Data,command,EMPTY,543,"EMPTY (x)","Returns true if x is"
Data,command,INSERT,544,"INSERT a, idx, val [, val [, ...]]]","Inserts the values to the specified array at the position idx."
Data,command,READ,546,"READ var1 [, var2, ..., varN]","Assigns values in DATA items to the specified variables var1 to varN. Unless a RESTORE command is executed, SmallBASIC moves to the next DATA item with each READ assignment. If SmallBASIC runs out of DATA items to read, an run-time error occurs."
Data,command,REDIM,547,"REDIM var([lower TO] upper [, …] [, …])","Reshape the array var while preserving the contents of the array. The array will have (upper - lower) + 1 elements. If lower is not specified, and OPTION BASE 1 hasn’t been used, elements start at 0."
Data,command,SEARCH,548,"SEARCH A, key, BYREF idx [USE cmpfunc( var1, var2)]","Scans an array A for the key key and returns the position idx of the element.  If the key is not found idx contains the value (LBOUND(A)-1). In default-base arrays (starting with element zero) -1 will be returned."
Data,command,SORT,549,"SORT byref A [USE cmpfunc( x, y )]","Sorts an array A in ascending order. The sorted array is return as A, therefore overwriting the initial array. If a compare function cmpfunc is specified, "
Data,command,SWAP,550,"SWAP a, b","Exchanges the values of the two variables a and b. a and b may be variables of any type."
Data,function,ARRAY,1432,"A = ARRAY [s | expr]","Creates a ARRAY or MAP variable from the given string s or expression expr. The ARRAY command supports JSON (Javascript object notation) syntax. The MAP provides value-key pair access along with array or dotted notation. "
Data,function,ISARRAY,555,"b = ISARRAY (x)","Returns true if x is an array."
Data,function,ISDIR,556,"b = ISDIR (dir)","Returns true if the string dir is a directory."
Data,function,ISFILE,557,"b = ISFILE (file)","Returns true if the string ""f"" is a regular file."
Data,function,ISLINK,558,"b = ISLINK (link)","Returns true if string link is a link. Works only in Linux and Android. In Windows ISLINK will return false."
Data,function,ISMAP,1430,"b = ISMAP (x)","Returns true if x is a MAP variable."
Data,function,ISNUMBER,559,"b = ISNUMBER (x)","Returns true if x is a number or can be converted to a number."
Data,function,ISSTRING,560,"b = ISSTRING (x)","Returns true if x is a string and cannot be converted to a number."
Data,function,LBOUND,561,"lb = LBOUND (array [, dim])","Returns the lower bound lb of an array array. dim can be used to specify, at which dimension the lower bound should be returned if array is a multi-dimensional array. If dim is not used the lower bound of the first dimension will be returned."
Data,function,LEN,562,"d = LEN(x)","Returns the length of the variable x."
Data,function,UBOUND,567,"ub = UBOUND (array [, dim])","Returns the upper bound ub of an array array. dim can be used to specify, at which dimension the upper bound should be returned if array is a multi-dimensional array. If dim is not used the upper bound of the first dimension will be returned."
Data,statement,DATA,569,"DATA constant1 [, constant2] ... [, constantN]","Stores one or more constants, of any type, for subsequent access via READ command."
Data,statement,DIM,570,"DIM var([lower TO] upper [, ...]) [, ...]","Reserves storage space for an array."
Data,statement,ERASE,571,"ERASE var[, var[, ... var]]","Deallocates the memory used by the specified arrays or variables. After that these variables turned to simple integers with zero value."
Data,statement,RESTORE,572,"RESTORE label","Specifies the position of the next data to be read."
Date,command,DATEDMY,573,"DATEDMY dmy| julian_date, BYREF d, BYREF m, BYREF y","Returns the day, month and the year as integers."
Date,command,TIMEHMS,574,"TIMEHMS hms| timer, BYREF h, BYREF m, BYREF s","Converts a time-value hms or timer to hours h, minutes m and seconds s integer values."
Date,function,DATE,575,"s = DATE","Returns the current date as string with format ""DD/MM/YYYY""."
Date,function,DATEFMT,576,"s = DATEFMT (format, dmy| (d,m,y)| julian_date)","Returns a formatted date string. The input date can be given as a date-string returned by DATE, as the integers d for day, m for month and y for year, or as a julian date. format is a string specifying the format of the date: "
Date,function,JULIAN,577,"j = JULIAN (dmy | (d,m,y))","Returns the Julian date. Dates must be greater than 1/1/100 AD. The date can be passed as the string dmy with the format DD/MM/YYYY. Alternatively the date can be given by specificing the parameters d for days, m for months and y for years."
Date,function,TICKS,1448,"n = TICKS","Returns the number of milliseconds that have elapsed since start of the operating system."
Date,function,TIME,578,"s = TIME","Returns the current time as string ""HH:MM:SS""."
Date,function,TIMER,1449,"n = TIMER","Returns the number of seconds from midnight."
Date,function,TIMESTAMP,1450,"s = TIMESTAMP (filename)","Returns the file filename last modified date and time as a string. The returned string s has the format ""YYYY-MM-DD hh:mm AM|PM""."
Date,function,WEEKDAY,579,"n = WEEKDAY (dmy | (d,m,y) | julian_date)","Returns the day of the week as a number between 0 and 6. Sunday is 0. WEEKDAY accepts a string dmy as returned by DATE, a number julian_date as returned by JULIAN or a date given by the three numbers d for day, m for month and y for year."
File,command,ACCESS,580,"n = ACCESS (file)","Returns the access rights of a file. The string file follows OS file naming conventions. The returned file permission number n follows the permission pattern of the chmod() and stat() system calls. The bits of n (in octal) are:"
File,command,BLOAD,582,"BLOAD filename[, address]","Loads a specified memory image file into memory."
File,command,BPUTC,583,"BPUTC #fileN, byte","Writes a byte byte on file or device in binary mode."
File,command,BSAVE,584,"BSAVE filename, address, length","Copies a specified portion of memory to a specified file."
File,command,CHDIR,585,"CHDIR dir","Changes the current working directory to dir. In Windows \\ needs to be replaced by \\\\"
File,command,CHMOD,586,"CHMOD file, mode","Change permissions of a file. The string file holds the file name and follows OS file naming conventions. mode provides the file permission and must be compatible with system call chmod()'s 'mode' parameter."
File,command,CLOSE,587,"CLOSE #fileN","Close a file or device with file-handle #fileN."
File,command,COPY,588,"COPY file, newfile","Makes a copy of file file to the file newfile."
File,command,DIRWALK,589,"DIRWALK dir [, wildcards] [USE f(x)]","Walk through the specified directory dir and its subdirectories. The user defined function f(x) takes x as a parameter. x contains information about the current file. f(x) must return zero to stop the process. wildcards can be used to filter the files."
File,command,INPUT,590,"INPUT #fileN; var1 [,delim] [, var2 [,delim]] ...","Reads data from file #fileN and stores the values in var1, var2 to varN. Specify a delimiter if necessary."
File,command,KILL,591,"KILL FileName","Deletes the file specified by FileName."
File,command,LOCK,592,"LOCK","Lock a record or an area (not yet implemented)."
File,command,MKDIR,593,"MKDIR dir","Creates the directory dir. dir is a string representing a valid directory name. dir can additionally contain a path. Without a path, the directory will be created in the current working directory. Errors can be catched using TRY ... CATCH."
File,command,OPEN,594,"OPEN file [FOR {INPUT|OUTPUT|APPEND}] AS #fileN","Makes a file, device or network connection available for sequential input, sequential output."
File,command,READ,601,"READ #fileN, var1 [, var2, ... , varN]","Read variables var1 to varN from a binary data file. Variables can be numbers, strings and arrays."
File,command,RENAME,595,"RENAME file, newfile","Renames the specified file file to newfile."
File,command,RMDIR,596,"RMDIR dir","Removes directory dir."
File,command,SEEK,597,"SEEK #fileN, pos","Sets file position to pos for the next read/write for file with the ID #fileN. The file position starts with 0."
File,command,TLOAD,598,"TLOAD file, BYREF var [, type]","Loads a text file file into the array variable var. Each text-line is an array element. The optional variable type defines the type of var: "
File,command,TSAVE,599,"TSAVE file, var","Writes array, map or string var to the text file file. Each array element is a text-line in the file. Every line of the string will be one line in the text file. Use \\n in the string to separate lines. Maps will be saved as a json string."
File,command,WRITE,600,"WRITE #fileN, var1 [, var2, ... , varN]","Store variables var1 to varN to a file as binary data. Variables can be numbers, strings and arrays."
File,function,BGETC,602,"c = BGETC (fileN)","Reads and returns a byte from file or device in binary mode."
File,function,EOF,603,"EOF (fileN)","Returns true if the file pointer is at end of the file. For serial port (RS232) and TCP/IP socket connection EOF returns true if the connection is broken. For socket connection the return value ofEOF will be updated every time data is recieved or send."
File,function,EXIST,604,"EXIST (file)","Returns true if file exists."
File,function,FILES,605,"FILES (exp)","Returns an array with the filenames. If there are no files, FILES returns an empty array. exp can contain the wildcards * and ?. exp can include a path."
File,function,FREEFILE,607,"FREEFILE","Returns an unused file handle."
File,function,INPUT,608,"s = INPUT (len [, fileN])","Reads 'len' bytes from file or console (if fileN is omitted) and returns the result as sting s. This function does not convert the data or remove spaces."
File,function,LOF,609,"l = LOF (fileN)","Returns the length l of a file with the file handle fileN in bytes. For other devices, returns the number of available data."
File,function,SEEK,610,"n = SEEK (fileN)","Returns the current file position of file with ID fileN. The file position start with 0."
Graphics,command,ARC,611,"ARC [STEP] x, y, r, astart, aend [, aspect [, color]] [COLOR color]","Draws an arc:"
Graphics,command,CHART,612,"CHART charttype, A [, style [, x1, y1, x2, y2]]","Draws a chart of array values in the rectangular area given by the points [x1, y1] and [x2, y2]. The array A stores y-values only: [y1, y2, y3, ... yn]."
Graphics,command,CIRCLE,613,"CIRCLE [STEP] x, y, r [, aspect [, color]] [COLOR color] [FILLED]","Draws a circle (or an ellipse if the aspect is specified). The point [x, y] defines the center and r the radius of the circle in pixel.  To set the aspect ration use aspect. An aspect ratio of 1 will draw a circle. color defines the line color of the circle. If FILLED is used, the circle will be filled with the color color. If STEP is used x, y are a step in pixel from the actual graphics cursor position."
Graphics,command,COLOR,614,"COLOR foreground-color [, background-color]","Specifies the foreground color foreground-color and the optional background color background-color."
Graphics,command,DRAW,615,"DRAW CommandString","Draw lines as specified by the given CommandString. The CommandString is created using commands from the Graphics Definition Language."
Graphics,command,DRAWPOLY,616,"DRAWPOLY array [,x-origin,y-origin [, scalef [, color]]] [COLOR color] [FILLED]","Draws a polyline. The array contains all the vertices of the polyline and can be defined as follow:"
Graphics,command,IMAGE,617,"IMAGE [#handle | fileName | http://path-to-file.png | image-var | array of pixmap data]","The IMAGE statement provides access to extended support for image manipulation. There are two supported image formats: PNG and XPM (see below)."
Graphics,command,LINE,618,"LINE [STEP] x,y [,|STEP x2,y2] [, color| COLOR color]","Draws a line from the point (x,y) to the point (x2,y2). If STEP is used, the graphics cursor is moved by a step of x and y pixels."
Graphics,command,PAINT,619,"PAINT [STEP] x, y [,fill-color [,border-color]]","Fills an enclosed area on the graphics screen with the color fill-color. x and y are screen coordinates within the area that is to be filled."
Graphics,command,PLOT,620,"PLOT xmin, xmax USE f(x)","Plots the graph of f(x) in the range from xmin to xmax. The variable must be x."
Graphics,command,PSET,621,"PSET [STEP] x,y [, color| COLOR color]","Draws a pixel at coordinate x,y with color color. If color is not defined, the current foreground color will be used."
Graphics,command,RECT,622,"RECT [STEP] x1,y1 [,|STEP x2,y2] [, color| COLOR color] [FILLED]","Draws a rectangle from point x1,y1 to point x2,y1. If STEP is used, start point and/or end point are relative to the current graphics cursor position. The line color of the rectangle will be color. If color is omitted then the current foreground color will be used as line color. When using FILLED, the rectangle will be filled with color color or with the current foreground color."
Graphics,command,SHOWPAGE,1429,"SHOWPAGE ([n])","This command is used to display pending graphics operations allowing for smooth animations. If SHOWPAGE is used, the internal SmallBASIC graphics update mechanism is set to manual mode. To enable automatic mode again, call SHOWPAGE with the optional parameter n = 1. This is useful, if the FORM command is used to display GUI elements. "
Graphics,command,VIEW,623,"VIEW [x1, y1, x2, y2 [, color [, border-color]]]","Defines a viewport with starting point (upper left corner)) [x1,y1] and end point (lower right corner) [x2,y2]. The optional parameters color and border-color define the background color and the border color of the viewport, respectively. VIEW without parameters will disable the last set viewport."
Graphics,command,WINDOW,624,"WINDOW [x1, x2, y2, y1]","Specifies ""world"" coordinates for the screen. The WINDOW command allows you to redefine the corners of the display screen as a pair of ""world"" coordinates. The coordinates of the upper-left corner of the screen is given by [x1, y1], the lower-left corner by [x2, y2]."
Graphics,constant,XMAX,1526,"n = XMAX","Returns the screen width in pixels."
Graphics,constant,YMAX,1527,"n = YMAX","Returns the screen height in pixels."
Graphics,function,PEN,627,"n = PEN (value)","Returns pen, mouse or tap data depending on value."
Graphics,function,POINT,628,"n = POINT (x [, y])","Returns the color of the pixel at x,y."
Graphics,function,RGB,629,"c = RGB (r, g, b)","Returns the RGB color code for the specified color values. r, g and b are the three color channels red, green and blue and take integer values from 0 to 255 for each of the color. Values outside that range will be clamped. The return value is a negative 24bit value to be used by the drawing functions."
Graphics,function,RGBF,630,"c = RGBF (r, g, b)","Returns the RGB color code for the specified color values. r, g and b are the three color channels red, green and blue and take floating point values from 0 to 1 for each of the colors. Values outside that range will be clamped. The return value is a negative 24bit value to be used by the drawing functions."
Graphics,function,TEXTHEIGHT,631,"n = TEXTHEIGHT (s)","Returns the text height of string s in pixel. "
Graphics,function,TEXTWIDTH,632,"n = TEXTWIDTH (s)","Returns the text width of string s in pixel. "
Graphics,function,TXTH,633,"n = TXTH (s)","Returns the text height of string s in pixel. "
Graphics,function,TXTW,634,"n = TXTW (s)","Returns the text width of string s in pixel. "
Graphics,function,XPOS,635,"n = XPOS","Returns the current X-position of the text cursor in ""characters""."
Graphics,function,YPOS,636,"n = YPOS","Returns the current Y-position of the text cursor in ""characters""."
Language,command,CALL,637,"CALL (p [, var1 [, ..., varN])","Invoke a sub or func by address pointer p. Optional var1 to varN variables of every SmallBASIC data type can be passed to function or sub, the address pointer points to."
Language,command,THROW,1437,"THROW [info [, ...]]","The THROW command is used to initiate a catch-able error. If there is no surrounding TRY/CATCH block, THROW can be used to abort the program. Optional a string info can be used to create an error message."
Language,constant,FALSE,1457,"FALSE","Boolean FALSE. "
Language,constant,TRUE,1455,"TRUE","Boolean TRUE. "
Language,function,IFF,638,"IFF (condition, return_value_true, return_value_false)","Inline version of IF."
Language,keyword,AS,1424,"OPEN file AS #fileN","Used in combination with OPEN to open a file using a file number."
Language,keyword,BG,1428,"SOUND frq, dur [, vol] [BG]","Play sound in the background. BG prevents the program from blocking while the sound plays."
Language,keyword,BYREF,639,"BYREF","Sub/func argument declaration. Changes to the variable will be passed back to the caller.  Equivalent syntax to the @ character."
Language,keyword,CASE,640,"CASE expr","Branch condition for a SELECT statement."
Language,keyword,CATCH,1426,"CATCH [var | expr]","The CATCH statement is used to catch a run-time error. This is typically used with errors raised when calling a file system command that cannot be completed, for example attempting to open a non-existent file."
Language,keyword,DECLARE,1419,"DECLARE FUNC xxx","Forward declare SUB or FUNC. Obsolete QB compatibility"
Language,keyword,DEF,641,"DEF name[(par1 [, ... , parN])] = expression","Defines a single line function with the function name name and the parameters par1 to parN. expression is a valid SmallBASIC expression returning a value. "
Language,keyword,DO,642,"DO","This keyword is used to declare single-line commands. It can be used with WHILE and FOR-family commands."
Language,keyword,ELIF,643,"ELIF","Short for ELSEIF."
Language,keyword,ELSE,644,"ELSE","Part of an if ... then ... else statement. For more information see IF."
Language,keyword,ELSEIF,645,"ELSEIF","Alternative condition in an IF statement."
Language,keyword,END TRY,1427,"END TRY","The END TRY statement marks the end of a TRY/CATCH block. For more information see TRY."
Language,keyword,ENDIF,646,"ENDIF","ENDIF ends an if statement. For more information see IF."
Language,keyword,EXIT,648,"EXIT [FOR|LOOP|SUB|FUNC]","Exits a multi line function definition, a loop, or a subprogram. By default (if no parameter is specified) exits from last command block (loop, for-loop or routine)."
Language,keyword,FI,650,"FI","FI ends an if statement. Same as ENDIF. For more information see IF."
Language,keyword,FUNC,651,"FUNC foo (a, b)","Declares a function. Return a value by assigning a variable with the same name as the function or by using RETURN."
Language,keyword,LOCAL,653,"LOCAL var1 [, var2, ..., varn]","Declare local variables inside a SUB or FUNC. Local variables are independent of global variables of the same name."
Language,keyword,NEXT,654,"NEXT","Ends the code block of a FOR ... NEXT loop. See FOR for more information."
Language,keyword,SELECT,655,"SELECT CASE expr","Perform multiple tests on the expression expr. Offers a more concise syntax to writing successive IF tests."
Language,keyword,STEP,1421,"FOR i = a TO b STEP s","Specifies the loop counter increment s in a FOR loop. The variable i will be increased in every loop by amount s. s can be a positive or negative number."
Language,keyword,STOP,656,"STOP [error]","Terminates execution of a program, closes all files opened by the program, and returns control to the operating system. The optional number error will be returned to the operating system; if not specified SmallBASIC returns 0. On Windows, the error value is known as ERRORLEVEL."
Language,keyword,SUB,657,"SUB foo ([ [BYREF] var1, [BYREF] var2, ..., [BYREF] varN])","Declare a sub procedure foo. The optional parameters var1 to varN can be all data types supported by SmallBASIC. Sub procedures do not return a value but can return argument values when declared as BYREF. A sub procedure ends with the keywords END or END SUB. The keyword LOCAL can be used to restrict the scope of a variable to the sub procedure only. Sub procedures can be nested within a sub procedure."
Language,keyword,THEN,658,"THEN","part of an if-statement. For more information see IF."
Language,keyword,TO,1420,"FOR t = var1 TO var2","Specifies the loop counter end in a FOR loop. For more information see FOR."
Language,keyword,TRY,1425,"TRY","The TRY statement introduces a TRY/CATCH block. A try/catch block consist of the following structure:"
Language,keyword,UNTIL,660,"UNTIL","Ends a REPEAT ... UNTIL loop. See REPEAT for more information."
Language,keyword,USE,661,"USE expr","Used with various commands for passing a user-defined expression expr."
Language,keyword,USG,1423,"PRINT USG","PRINT USG uses the FORMAT function to display numbers and strings."
Language,keyword,USING,1422,"PRINT USING","PRINT USING uses the FORMAT function to display numbers and strings."
Language,operator,AND,662,"n = a AND b","Logical AND. Right side is not evaluated if left side evaluates to FALSE."
Language,operator,BAND,663,"y = a BAND b","Bitwise AND."
Language,operator,BOR,664,"y = a BOR b","Bitwise OR."
Language,operator,EQV,665,"a EQV b","Bitwise equivalence."
Language,operator,IMP,666,"a IMP b","Perform a logical implication on two expressions. IMP is equivalent to (NOT a) OR b."
Language,operator,IN,667,"a IN b","- b is an array: Returns the index (1 based) of the first matching element. If no matching element, IN returns FALSE."
Language,operator,LIKE,668,"c = a LIKE b","Regular-expression operator. Compares the left part a of the expression with the right side regex pattern b and returns true or false."
Language,operator,LSHIFT,1496,"result = x LSHIFT n","Performs a bitwise operation that shifts all the bits of x to the left by an amount of n."
Language,operator,MDL,669,"m = x MDL y","Returns the modulus. The difference to MOD and % is, that MDL works also with float numbers instead of only integers."
Language,operator,MOD,670,"m = a MOD b","Calculates the Modulus. Returns the remainder of a/b as integer. Equivalent syntax to % and MDL."
Language,operator,NAND,671,"y = a NAND b","Bitwise exclusive NOT AND."
Language,operator,NOR,672,"y = a NOR b","Bitwise NOT OR."
Language,operator,NOT,673,"y = NOT {a|expr}","Logical operator to invert variable or expression result. Equivalent syntax to y = !a. NOT returns true if variable or expression result is false or zero. Otherwise it returns false."
Language,operator,OR,674,"y = a OR b","Logical OR. Right side is not evaluated if left side evaluates to True."
Language,operator,RSHIFT,1497,"result = x RSHIFT n","Performs a bitwise operation that shifts all the bits of x to the right by an amount of n."
Language,operator,XNOR,675,"n = a XNOR b","Bitwise exclusive NOT OR."
Language,operator,XOR,676,"n = a XOR b","Bitwise exclusive OR."
Language,statement,CONST,678,"CONST name = expr","Declare a variable name who's value does not change during program execution. name follows the rules for naming SmallBASIC variables. expr is an expression consisting of literals, with or without operators, only."
Language,statement,END,679,"END","Declares the END of a SUB, a FUNC or the program."
Language,statement,FOR,680,"FOR counter = start TO end [STEP incr] ... NEXT","> FOR element IN array (or map) ... NEXT"
Language,statement,GOSUB,681,"GOSUB label","Causes program execution to branch to the specified label;"
Language,statement,GOTO,682,"GOTO label","Causes program execution to branch to a specified position (label)."
Language,statement,IF,683,"IF expr","Tests the expression and if it evaluates to a non-zero value, program flow will resume after the following THEN statement."
Language,statement,LABEL,684,"LABEL LabelName","Defines a label with name LabelName. A label marks a position in the code. Use GOTO or GOSUB to continue program execution at that label. "
Language,statement,LET,685,"LET var = expr","Assigns a value or expression expr to the variable var. LET is used mainly for compatibility reasons and not necessary for programming in SmallBASIC."
Language,statement,ON,686,"ON n GOTO|GOSUB label1 [, ..., labelN]","Causes a branch of the program to one of the labels label1 to labelN. n defines the number of the label. If n = 1 the first label is used; with n = N the Nth label is used. n must be in the range 0 to 255."
Language,statement,REM,688,"REM comment","Code comments. Comments can also be introduced using #, single quote character '."
Language,statement,REPEAT,689,"REPEAT ... UNTIL expr","Begins the definition of a REPEAT/UNTIL loop."
Language,statement,RETURN,690,"RETURN","> RETURN {var|expr}"
Language,statement,WEND,691,"WEND","End of a WHILE ... WEND loop. See WHILE for more information."
Language,statement,WHILE,692,"WHILE expr","Starts a WHILE ... WEND loop. "
Math,command,DERIV,693,"DERIV x, maxtries, maxerr, BYREF result, BYREF errcode USE expr","Calculation of derivative."
Math,command,DIFFEQN,694,"DIFFEQN x0, y0, xf, maxseg, maxerr, BYREF yf, BYREF errcode USE expr","Solving first-order differential equations using Runge-Kutta method."
Math,command,EXPRSEQ,695,"EXPRSEQ BYREF array, xmin, xmax, count USE expression","Returns an array with 'count' elements. Each element has the 'y' value of its position as it is returned by the expression."
Math,command,INTERSECT,696,"INTERSECT Ax, Ay, Bx, By, Cx, Cy, Dx, Dy, BYREF type, BYREF Rx, BYREF Ry","Calculates the intersection of two line segments AB and CD given by the point Ax, Ay, Bx, By and Cx, Cy, Dx, Dy."
Math,command,M3APPLY,697,"M3APPLY M, BYREF poly","Apply 2D transformation matrix M to poly-line poly. Transformation matrix M is a 3x3 matrix."
Math,command,M3IDENT,698,"M3IDENT BYREF M","Creates a 3x3 Identity matrix M:"
Math,command,M3ROTATE,699,"M3ROTATE BYREF M, angle [, x, y]","Multiply the 2D transformation matrix M by a rotation matrix with an angle angle and a rotation center x,y. M is a 3x3 matrix."
Math,command,M3SCALE,700,"M3SCALE BYREF M, Ox, Oy, Sx, Sy","Multiply the 2D transformation matrix M by a scale matrix. Sx and Sy are the scaling factors in x and y direction. Ox and Oy define the position of the origin. "
Math,command,M3TRANS,701,"M3TRANS BYREF M, Tx, Ty","Multiply the 2D transformation matrix M by a translation matrix. Tx and Ty are the translations in x and y direction. M is a 3x3 matrix."
Math,command,POLYEXT,702,"POLYEXT poly, BYREF xmin, BYREF ymin, BYREF xmax, BYREF ymax","Returns the extents of the polyline poly. xmin and xmax are extents in x-direction and ymin and ymax are the extents in y-direction. "
Math,command,ROOT,703,"ROOT low, high, segs, maxerr, BYREF result, BYREF errcode USE expr","Roots of f(x)."
Math,function,ABS,704,"f = ABS (x)","Returns the absolute value of x."
Math,function,ABSMAX,705,"f = ABSMAX (var1 [, var2, ... , varN] )","Returns the absolute maximum value of var1 to varN. var1 to varN can be numbers and arrays of numbers."
Math,function,ABSMIN,706,"f = ABSMIN (var1 [, var2, ... , varN] )","Returns the absolute minimum value of var1 to varN. var1 to varN can be numbers and arrays of numbers."
Math,function,ACOS,707,"f = ACOS (x)","Inverse cosine of x."
Math,function,ACOSH,708,"f = ACOSH (x)","Inverse hyperbolic cosine of x"
Math,function,ACOT,709,"f = ACOT (x)","Inverse cotangent of x."
Math,function,ACOTH,710,"f = ACOTH (x)","Inverse hyperbolic cotangent of x."
Math,function,ACSC,711,"f = ACSC (x)","Inverse cosecant of x."
Math,function,ACSCH,712,"f = ACSCH (x)","Inverse hyperbolic cosecant of x."
Math,function,ASEC,713,"f = ASEC (x)","Inverse secant of x."
Math,function,ASECH,714,"f = ASECH (x)","Inverse hyperbolic secant of x."
Math,function,ASIN,715,"f = ASIN (x)","Inverse sine of x."
Math,function,ASINH,716,"f = ASINH (x)","Inverse hyperbolic sine of x."
Math,function,ATAN,717,"f = ATAN (x)","Inverse tangent of x."
Math,function,ATAN2,718,"a = ATAN2 (x, y)","Returns the angle a in radians of a right-angled triangle, where x is the opposite side and y is the adjacent side.  "
Math,function,ATANH,719,"f = ATANH (x)","Inverse hyperbolic tangent of x."
Math,function,ATN,720,"f = ATN (x)","Inverse tangent of x. Equivalent to ATAN."
Math,function,CEIL,721,"n = CEIL (x)","Smallest integer value not less than x."
Math,function,COS,722,"f = COS (x)","Cosine of x. x is in radians."
Math,function,COSH,723,"f = COSH (x)","Hyperbolic cosine of x."
Math,function,COT,724,"f = COT (x)","Cotangent of x."
Math,function,COTH,725,"f = COTH (x)","Cotangent hyperbolicus of x."
Math,function,CSC,726,"f = CSC (x)","Cosecant of x."
Math,function,CSCH,727,"f = CSCH (x)","Hyperbolic cosecant of x."
Math,function,DEG,728,"f = DEG (x)","Converts radians x to degrees."
Math,function,DETERM,729,"D = DETERM (A [, toler])","Determinant of A. toler is the tolerance number. It is equivalent to the absolute value of the lowest acceptable number. Default value is 0."
Math,function,EXP,730,"EXP (x)","Returns the value of e raised to the power of x."
Math,function,FIX,731,"FIX (x)","Rounds x upwards to the nearest integer."
Math,function,FLOOR,732,"FLOOR (x)","Largest integer value not greater than x."
Math,function,FRAC,733,"FRAC (x)","Fractional part of x."
Math,function,INT,734,"i = INT (x)","Rounds x downwards to the nearest integer."
Math,function,INVERSE,735,"I = INVERSE (A)","Returns the inverse matrix I of matrix A."
Math,function,LINEQN,736,"C = LINEQN (A, B [, toler])","Solves linear equations using the Gauss-Jordan method."
Math,function,LOG,737,"f = LOG (x)","Returns the natural logarithm of x."
Math,function,LOG10,738,"f = LOG10 (x)","Returns the base-10 logarithm of x."
Math,function,MAX,739,"m = MAX (var1 [, var2, ..., varN)","MAX returns the maximum value of the given parameters var1 to varN. Parameters can be numbers, arrays or strings."
Math,function,MIN,740,"m = MIN (var1 [, var2, ..., varN])","Returns the minimum value of the given parameters var1 to varN. Parameters can be numbers, arrays or strings."
Math,function,POLYAREA,741,"a = POLYAREA (poly)","Returns the area of the polyline poly. The algebraic sign of the area is positive for counterclockwise ordering of vertices in x-y plane;"
Math,function,POLYCENT,742,"c = POLYCENT(poly)","returns the centroid of a polygon poly as an array. The first element contains the x- the second element contains the y-coordinate of the centroid. POLYCENT will return an empty array if the area of the polygon is zero and the centroid is undefined."
Math,function,POW,743,"n = POW (x, y)","returns x raised to power of y."
Math,function,PTDISTLN,744,"d = PTDISTLN (Bx, By, Cx, Cy, Ax, Ay)","Distance of point A from line B, C. Point A  is given by the coordinates (Ax, Ay), B by (Bx, By) and C by (Cx, Cy)"
Math,function,PTDISTSEG,745,"d = PTDISTSEG (Bx, By, Cx, Cy, Ax, Ay)","Distance of point A from line segment B-C. Point A is given by the coordinates (Ax, Ay), B by (Bx, By) and C by (Cx, Cy)."
Math,function,PTSIGN,746,"s = PTSIGN (Ax, Ay, Bx, By, Qx, Qy)","The sign of point Q from line segment A->B. Point Q is given by the coordinates (Qx, Qy), A by (Ax, Ay) and B by (Bx, By)."
Math,function,RAD,747,"f = RAD (x)","Converts x in degrees to radians."
Math,function,RND,748,"f = RND","Returns a random floating point number in the range 0 to 1."
Math,function,ROUND,749,"f = ROUND (x [, decs])","Rounds x to the nearest integer or number with decs decimal digits. decs is an optional parameter."
Math,function,SEC,750,"f = SEC (x)","Secant of x."
Math,function,SECH,751,"f = SECH (x)","Hyperbolic secant of x."
Math,function,SEGCOS,752,"f = SEGCOS (Ax, Ay, Bx, By, Cx, Cy, Dx, Dy)","Cosine of the two line segments AB and CD. Start and end of the first line segment are given by the points (Ax,Ay) and (Bx, By). For the second line by (Cx, Cy) and (Dx, Dy)."
Math,function,SEGLEN,753,"f = SEGLEN (Ax, Ay, Bx, By)","Length of line segment AB. The starting and ending point of the line segment is given by (Ax, Ay) and (Bx, By)."
Math,function,SEGSIN,754,"f = SEGSIN (Ax, Ay, Bx, By, Cx, Cy, Dx, Dy)","Sinus of 2 line segments AB and CD. Start and end of the first line segment are given by the points (Ax,Ay) and (Bx, By). For the second line by (Cx, Cy) and (Dx, Dy)."
Math,function,SEQ,755,"a = SEQ (xmin, xmax, count)","Returns an array with count elements of evenly spaced points between xmin and xmax. The spacing between the points is (xmax - xmin) / (n - 1)."
Math,function,SGN,756,"n = SGN (x)","Sign of x. Return values are +1 for positive x, -1 for negative x and 0 for zero. SGN cannot accept a numeric string, such as ""24"", as an argument."
Math,function,SIN,757,"f = SIN (x)","Calculate the Sine of x. x is in radians."
Math,function,SINH,758,"f = SINH (x)","Hyperbolic sine of x."
Math,function,SQR,759,"f = SQR (x)","Square root of x."
Math,function,STATMEAN,760,"f = STATMEAN (var1 [, var2, ... , varN])","Arithmetical mean (average). var1 to varN can be single numbers or arrays."
Math,function,STATMEANDEV,761,"f = STATMEANDEV (var1 [, var2, ... , varN])","Mean absolute deviation around arithmetic mean. var1 to varN can be single numbers or arrays."
Math,function,STATMEDIAN,1801,"f = STATMEDIAN (var1 [, var2, ... ,varN])","The median of a finite list of numbers is the ""middle"" number, when those numbers are listed in order from smallest to greatest. var1 to varN can be single numbers or arrays."
Math,function,STATSPREADP,762,"f = STATSPREADP (var1 [, var2, ... , varN])","Biased sample variance. var1 to varN can be single numbers or arrays."
Math,function,STATSPREADS,763,"f = STATSPREADS (var1 [, var2, ..., varN])","Unbiased sample variance. var1 to varN can be single numbers or arrays."
Math,function,STATSTD,1800,"f = STATSTD (var1 [, var2, ... , varN)","(Corrected sample) standard deviation. var1 to varN can be single numbers or arrays."
Math,function,SUM,764,"f = SUM (var1 [, ..., varN])","Sum of value(s) var1 to varN. var1 to varN are single numbers or arrays."
Math,function,SUMSQ,765,"f = SUMSQ (var1 [, ..., varN])","Sum of square value(s) var1 to varN. var1 to varN are single numbers or arrays."
Math,function,TAN,766,"f = TAN (x)","Tangent of x. x is in radian."
Math,function,TANH,767,"TANH (x)","Hyperbolic tangent."
Math,function,TRANSPOSE,1802,"A = TRANSPOSE (M)","Calculates the transpose A of a 2D matrix or a vector M."
String,command,JOIN,545,"JOIN words, delimiter, s","Join the elements of the array words with the delimiter delimiter and return the result as string s."
String,command,SINPUT,768,"SINPUT src; var1 [, delim1] [,var2 [, delim2]] ... [,varN [, delimN]]","Splits the string src into substrings which are separated by delimiters delim1 to delimN and returns the substrings as var1 to varN. Delimiters can be single characters, numbers or strings."
String,command,SPLIT,769,"SPLIT s, delim, byref words [, pairs] [USE expr]","Splits the string s at the position of the given delimiters delim and returns an array words with the splitted substrings. The optional parameter pairs can be used to group words. The optional Use expr is applied to every splitted substring. If delim contains more than one character, each character representing a delimiter."
String,command,SPRINT,770,"SPRINT byref s; [USING...;] ...","Create a formated string and storing it to string s. SPRINT supports all features of PRINT. See PRINT for detailed information. USG can be used instead of USING."
String,function,ASC,771,"n = ASC (s)","Returns the ASCII code of first character of the string s."
String,function,BCS,772,"r = BCS (s)","Converts the BASIC-style string s to C-style string by masking escape codes. Escape codes in the string will not be applied to format the string when printed on the screen. Instead escape codes will be printed as they are."
String,function,BIN,773,"s = BIN (x)","Returns the binary value of x as string."
String,function,CBS,774,"r = CBS (s)","Converts C-style string s to BASIC-style string by unmasking escape codes. Escape codes in the string will be applied to format the string when printed on the screen."
String,function,CHOP,775,"s = CHOP (source)","Chops off the last character of the string source."
String,function,CHR,776,"s = CHR (x)","Returns an one-char string of character with ASCII code x."
String,function,DISCLOSE,777,"s = DISCLOSE (str [, pairs [, ignore-pairs]])","Discloses the string str. pairs is a string of 2n characters. Two consecutive characters form a pair. The characters of str which are positioned between the first matching pair of pairs will be returned. ignore-pairs is a string with 2n characters. Two consecutive characters form a ignore-pair. All characters of str between an ignore-pair will be ignored (not returned)."
String,function,ENCLOSE,778,"ENCLOSE (str[, pair])","Encloses a string using the two characters in string pair. ENCLOSE defaults to double quotes if pair is not used."
String,function,FORMAT,779,"FORMAT (format, val)","Returns a formated string."
String,function,HEX,780,"HEX (x)","Returns the hexadecimal value of x as string."
String,function,INSTR,781,"pos = INSTR ([start,] s1, s2)","Returns the position pos of the first occurrence of the string s2 in string s1 (starting from the position start). If there is no match, INSTR returns 0."
String,function,LCASE,782,"ls = LCASE (s)","Converts the string s to a lower case string ls."
String,function,LEFT,783,"ls = LEFT (s [,n])","Returns the n number of leftmost chars of string s as string ls. If n is not specified then n = 1."
String,function,LEFTOF,784,"s = LEFTOF (s1, s2)","Returns the left part of s1 at the position of the first occurrence of the string s2 in string s1. If s2 does not occur in string s1, an empty string will be returned."
String,function,LEFTOFLAST,785,"s = LEFTOFLAST (s1, s2)","Returns the left part of s1 at the position of the last occurrence of the string s2 in string s1. If s2 does not occur in s1, an empty string will be returned."
String,function,LOWER,786,"lc = LOWER (s)","Converts the string s to the lower-case string lc."
String,function,LTRIM,787,"lt = LTRIM (s)","Removes leading white-spaces from string s."
String,function,MID,788,"r = MID (s, start [,length])","Returns the substring of string s starting from the position start with length length. If the length parameter is omitted, MID returns the whole string from the position start."
String,function,OCT,789,"s = OCT (x)","Returns the octal value of x as string."
String,function,REPLACE,790,"s = REPLACE (source, pos, str [, len])","Writes the string str into string source at position pos and returns the new string. This function replaces len characters. The default value of len is the length of str."
String,function,RIGHT,791,"r = RIGHT (s[,n])","Returns the n number of rightmost chars of string s. If n is not specified n = 1."
String,function,RIGHTOF,792,"r = RIGHTOF (s1, s2)","Returns the right part of string s1 at the position of the first occurrence of string s2 in s1. If s2 does not occur in s1 RIGHTOF returns an empty string."
String,function,RIGHTOFLAST,793,"r = RIGHTOFLAST (s1, s2)","Returns the right part of string s1 at the position of the last occurrence of string s2 in s1. If s2 does not occur in s1 RIGHTOFLAST returns an empty string."
String,function,RINSTR,794,"n = RINSTR ( [start], s1, s2 )","Returns the position of the last occurrence of string s2 in string s1 starting from the position start. If there is no match, RINSTR returns 0"
String,function,RTRIM,795,"r = RTRIM (s)","Removes trailing white-spaces from string s."
String,function,SPACE,796,"s = SPACE (n)","Returns a string of n spaces."
String,function,SPC,797,"s = SPC (n)","Returns a string of n spaces."
String,function,SQUEEZE,798,"r = SQUEEZE (s)","Removes all leading, trailing and duplicated white-space from string s."
String,function,STR,799,"s = STR (n)","Converts the number n into a string."
String,function,STRING,800,"s = STRING ( count, {str | chr} )","Creates a new string, which repeats the string str count times. If instead of a string a number chr is given, chr will be interpreted as an ASCII-code and the corresponding character will be repeated count times."
String,function,TRANSLATE,801,"s = TRANSLATE (source, what [, with])","Translates all occurrences of the string what found in string source with the string with and returns the new string. If with is not given, all occurrences of what will be removed."
String,function,TRIM,802,"r = TRIM(s)","Removes all leading and trailing white-space from string s."
String,function,UCASE,803,"us = UCASE (s)","Converts the string s to a upper case string us."
String,function,UPPER,804,"us = UPPER (s)","Converts the string s to a upper case string us."
String,function,VAL,805,"f = VAL (s)","Returns the numeric value of string s. If s cannot be converted to a number, VAL will return 0. VAL does not evaluate the string."
System,command,DELAY,806,"DELAY ms","Delay for a specified amount of milliseconds ms. Note DELAY depends on the system clock."
System,command,ENV,807,"ENV expr","Adds a variable to the current environment variable-table."
System,command,PAUSE,809,"PAUSE [secs]","Waits for a key press, a mouse click or the optional amount of seconds secsbefore executing next statement."
System,command,RANDOMIZE,810,"RANDOMIZE [seed]","Seeds the random number generator.  An optional integer number can be provided as the seed seed. If no seed is given, then the amount of clock ticks elapsed since the program was launched is used as the seed."
System,command,STKDUMP,812,"STKDUMP","Display internal execution stack."
System,command,TROFF,813,"TROFF","Turns off the trace mechanism. When trace mechanism is ON, SmallBASIC displays each line number as the program is executed."
System,command,TRON,814,"TRON","Turns on the trace mechanism. When trace mechanism is ON, SmallBASIC displays each line number as the program is executed."
System,constant,COMMAND,1521,"s = COMMAND","Returns a string s containing the SmallBASIC startup command line options."
System,constant,CWD,1522,"s = CWD","Gets current working directory."
System,constant,HOME,1525,"HOME","Returns the user home folder."
System,constant,MAXINT,1736,"n = MAXINT","Returns the maximum value for an integer. The value depends on whether you are using a 32 or 64 bit build of SmallBASIC."
System,constant,NIL,1735,"a = NIL","Sets a variable to nil. NIL is used to mean 'not set' as distinct from having a number set to 0."
System,constant,PI,1524,"n = PI","Returns PI. See: [Wikipedia](https://en.wikipedia.org/wiki/Pi)"
System,constant,SBVER,1523,"SBVER","Shows version and build information."
System,constant,SELF,1734,"SELF","Pseudo class instance variable"
System,function,FRE,606,"FRE (x)","Returns system memory information. eg, 0 = free memory. If a value is not supported by the operating system, fre will return 0. fre() without a parameter returns the free physical memory."
System,function,PROGLINE,817,"n = PROGLINE","Returns the current program line number."
System,function,RUN,818,"[s =] RUN cmdstr","Loads a secondary copy of the system shell and executes a program or a shell command given by the string cmdstr. The execution of the calling BASIC program will be stopped and control returns to the BASIC program once the system command has completed. If RUN is called as a function, the return value s holds the text output of the executed command as a string. "
System,keyword,EXEC,1443,"EXEC (file)","Transfers control to the program file. Control returns to the calling bas-file immediately and the program is executed parallel and independent to SmallBASIC. File name is case sensitive in Linux. Enclose the string file with quotation marks to start a program with parameters."
System,keyword,EXPORT,1440,"EXPORT thing","Export a SUB, FUNC or variable from a UNIT to be used by the unit consumer."
System,keyword,IMPORT,1441,"IMPORT UnitName [as MyName]","Import an exported UNIT or a module with the name UnitName using the namespace MyName."
System,keyword,UNIT,1446,"UNIT name","Declares the source module as a unit. Units are a set of procedures, functions, constants or variables that can be used by another program or unit."
System,statement,CHAIN,1439,"CHAIN source","Compile and run the given source. source can be a file name, a line of code or an array of code. Use ENV to share variables with the parent process."
System,statement,INCLUDE,1462,"INCLUDE SourceFile","Inserts code from SourceFile when the program is compiled."
System,statement,OPTION,1442,"OPTION keyword","Used to pass parameters to the run-time environment."
