[CLS]
Syntax: CLS
Description: Clears the console screen.

[COLOR]
Syntax: COLOR fg, bg
Description: Sets the foreground and background colors for text.

[CURSOR]
Syntax: CURSOR state
Description: Turns the cursor on (1) or off (0).

[GOTO]
Syntax: GOTO label
Description: Jumps execution to a label:.

[IF]
Syntax: IF condition THEN ... [ELSE ...] ENDIF
Description: Conditional execution block. Single-line IF condition THEN statement is also supported.

[FOR]
Syntax: FOR ... TO ... STEP ... NEXT
Description: Defines a loop that repeats a specific number of times.

[FOR EACH]
Syntax: FOR EACH variable IN collection
Description: Iterates over every element in a collection, such as an Array or a Map.

[DO]
Syntax: DO ... LOOP [WHILE/UNTIL condition]
Description: Defines a loop that continues as long as a condition is met or until a condition is met.

[TRY]
Syntax: TRY ... CATCH ... FINALLY ... ENDTRY
Description: Structured error handling.

[OPTION]
Syntax: OPTION option$
Description: Sets a VM option. OPTION "NOPAUSE" disables the ESC/Space break/pause functionality.

[SLEEP]
Syntax: SLEEP milliseconds
Description: Pauses execution for a specified duration.

[STOP]
Syntax: STOP
Description: Halts program execution and returns to the Ready prompt, preserving variable state. Execution can be continued with RESUME.

[EXECUTE]
Syntax: EXECUTE(code_string$)
Description: Compiles and executes a string of jdBasic code at runtime.

[IMPORT]
Syntax: IMPORT [modul]
Description: Loads the jdBasic module. Ex. IMPORT MATH imports the file math.jdb

[EXPORT]
Syntax: EXPORT MODUL [module]
Description: Marks a file as EXPORT for importing with IMPORT

[IMPORTDLL]
Syntax: IMPORTDLL [funcfile]
Description: Loads the funcfile.dll as dynmaic library and register all included functions for jdBasic.

[COMPILE]
Syntax: COMPILE
Description: Compiles the source code currently in memory into p-code.

[DUMP]
Syntax: DUMP "GLOBAL" / "LOCAL" / "STACK"
Description: Dumps the p-code (If no parameter is given) of the main program or a loaded module to the console for debugging. "GLOBAL" dumps global variables. "LOCAL" dumps local variables. "STACK" dumps call stack.

[EDIT]
Syntax: EDIT
Description: Opens the integrated text editor with the current source code.

[LIST]
Syntax: LIST
Description: Lists the current source code in memory to the console.

[LOAD]
Syntax: LOAD "filename"
Description: Loads a source file from disk into memory.

[RUN]
Syntax: RUN
Description: Compiles and runs the program currently in memory.

[SAVE]
Syntax: SAVE "filename"
Description: Saves the source code in memory to a file on disk.

[TRON]
Syntax: TRON / TROFF
Description: Turns instruction tracing on or off.

[LOADWS]
Syntax: LOADWS "workspacename"
Description: Loads a source file and all variables of a saved workspace from disk into memory.

[SAVEWS]
Syntax: SAVEWS "workspacename"
Description: Saves the source code and variables (Workspace) in memory to a file on disk.

[CLEARWS]
Syntax: CLEARWS
Description: Empties source code, p-code, and all global variables.

[NEW]
Syntax: NEW
Description: Empties the source code, compiled p-code, and user-defined function tables.

[DIR]
Syntax: DIR [path]
Description: Lists files and directories. Supports wildcards like * and ?.

[DIR$]
Syntax: DIR$([path]) -> String
Description: Lists files and directories and returns them as a string array. Supports wildcards like * and ?.

[CD]
Syntax: CD "path"
Description: Changes the current working directory.

[PWD]
Syntax: PWD
Description: Prints the current working directory.

[MKDIR]
Syntax: MKDIR "path"
Description: Creates a new directory.

[KILL]
Syntax: KILL "filename"
Description: Deletes a file.

[JSON.PARSE$]
Syntax: JSON.PARSE$(json_string$)
Description: Parses a JSON string and returns a special JsonObject.

[JSON.STRINGIFY$]
Syntax: JSON.STRINGIFY$(map_or_array)
Description: Takes a Map or Array variable and returns its compact JSON string representation.

[CREATEOBJECT]
Syntax: CREATEOBJECT(progID$)
Description: Creates a COM Automation object (e.g., "Excel.Application") and returns a ComObject.

[LEFT$]
Syntax: LEFT$(str$, n)
Description: Extracts parts of a string.

[RIGHT$]
Syntax: RIGHT$(str$, n)
Description: Extracts parts of a string.

[MID$]
Syntax: MID$(str$, start, [len])
Description: Extracts parts of a string.

[LEN]
Syntax: LEN(expression)
Description: Returns the length of the string representation of an expression.

[LCASE$]
Syntax: LCASE$(str$)
Description: Manipulates string case and whitespace.

[UCASE$]
Syntax: UCASE$(str$)
Description: Manipulates string case and whitespace.

[TRIM$]
Syntax: TRIM$(str$)
Description: Manipulates string case and whitespace.

[STR$]
Syntax: STR$(number)
Description: Converts between numbers and strings.

[VAL]
Syntax: VAL(string$)
Description: Converts between numbers and strings.

[CHR$]
Syntax: CHR$(ascii_code)
Description: Converts between ASCII codes and characters.

[ASC]
Syntax: ASC(char$)
Description: Converts between ASCII codes and characters.

[INSTR]
Syntax: INSTR$([start, ]haystack$, needle$)
Description: Finds the position of one string within another.

[SPLIT]
Syntax: SPLIT(source$, delimiter$)
Description: Splits a string by a delimiter and returns a 1D array of strings.

[SIN]
Syntax: SIN(numeric expression or array)
Description: Returns the Sinus.

[COS]
Syntax: COS(numeric expression or array)
Description: Returns the Cosinus.

[TAN]
Syntax: TAN(numeric expression or array)
Description: Returns the Tangens.

[SQR]
Syntax: SQR(numeric expression or array)
Description: Returns the Square Root

[RND]
Syntax: RND(numeric expression or array)
Description: Returns a random value

[FAC]
Syntax: FAC(numeric expression or array)
Description: Factorial Function.

[INT]
Syntax: INT(numeric expression or array)
Description: Traditional BASIC integer function (floor)

[FLOOR]
Syntax: FLOOR(numeric expression or array)
Description: Rounds down.

[CEIL]
Syntax: CEIL(numeric expression or array)
Description: Rounds up.

[TRUNC]
Syntax: TRUNC(numeric expression or array)
Description: Truncates toward zero.

[SHL]
Syntax: SHL(value or array, bits_to_shift) -> number or array
Description: Bit shift left.

[SHR]
Syntax: SHR(value or array, bits_to_shift) -> number or array
Description: Bit shift right.

[REGEX.MATCH]
Syntax: REGEX.MATCH(pattern$, text$)
Description: Checks if the entire text$ string matches the pattern$.

[REGEX.FINDALL]
Syntax: REGEX.FINDALL(pattern$, text$)
Description: Finds all non-overlapping occurrences of pattern$ in text$.

[REGEX.REPLACE]
Syntax: REGEX.REPLACE(pattern$, text$, replacement$)
Description: Replaces all occurrences of pattern$ in text$ with replacement$.

[APPEND]
Syntax: APPEND(array, value)
Description: Appends a scalar value or all elements of another array to a given array, returning a new flat 1D array.

[DIFF]
Syntax: DIFF(array1, array2)
Description: Returns a new array containing elements that are in array1 but not in array2.

[IOTA]
Syntax: IOTA(N)
Description: Generates a 1D array of numbers from 1 to N.

[REDUCTION]
Syntax: SUM, PRODUCT, MIN, MAX, ANY, ALL
Description: Functions that reduce an array to a single value (e.g., SUM(my_array)) or a vector (SUM(my_array, dimension)).

[SCAN]
Syntax: SCAN(operator, array) -> array
Description: Performs a cumulative reduction (scan) along the last axis of an array.

[SELECT]
Syntax: SELECT(function@, array) -> array
Description: Applies a user-defined function to each element of an array.

[FILTER]
Syntax: FILTER(function@, array) -> array
Description: Filters an array by applying a user-defined predicate function to each element.

[REDUCE]
Syntax: REDUCE(function@, array, [initial_value]) -> value
Description: Performs a cumulative reduction on an array using a user-provided function.

[TAKE]
Syntax: TAKE(N, array)
Description: Takes or drops N elements from the beginning (or end if N is negative) of an array.

[DROP]
Syntax: DROP(N, array)
Description: Takes or drops N elements from the beginning (or end if N is negative) of an array.

[RESHAPE]
Syntax: RESHAPE(array, shape_vector)
Description: Creates a new array with new dimensions from the data of a source array.

[REVERSE]
Syntax: REVERSE(array)
Description: Reverses the elements of an array.

[TRANSPOSE]
Syntax: TRANSPOSE(matrix)
Description: Transposes a 2D matrix.

[MATMUL]
Syntax: MATMUL(matrixA, matrixB)
Description: Performs matrix multiplication.

[MVLET]
Syntax: MVLET(matrix, dimension, index, vector) -> matrix
Description: Replaces a row or column in a matrix with a vector, returning a new matrix.

[INTEGRATE]
Syntax: INTEGRATE(function@, limits, rule)
Description: It parses arguments, performs the coordinate transformation, and loops through the Gauss points to calculate the final sum.

[SOLVE]
Syntax: SOLVE(matrix A, vextor b) -> vector_x
Description: Solves the linear system Ax = b for the unknown vector x.

[INVERT]
Syntax: INVERT(matrix) -> matrix
Description: Computes the inverse of a square matrix.

[STACK]
Syntax: STACK(dimension, array1, array2, ...) -> matrix
Description: Stacks 1D vectors into a 2D matrix.

[SLICE]
Syntax: SLICE(matrix, dim, index)
Description: Extracts a row (dim=0) or column (dim=1) from a 2D matrix.

[GRADE]
Syntax: GRADE(vector)
Description: Returns the indices that would sort the vector.

[OUTER]
Syntax: OUTER(vecA, vecB, op$ or funcref)
Description: Creates an outer product table using an operator (+, -, *, /, MOD, >, <, =, ^) or a reference to a function (srq@).

[ROTATE]
Syntax: ROTATE(array, shift_vector) -> array
Description: Cyclically shifts an N-dimensional array.

[SHIFT]
Syntax: SHIFT(array, shift_vector, [fill_value]) -> array
Description: Non-cyclically shifts an N-dimensional array.

[CONVOLVE]
Syntax: CONVOLVE(array, kernel, wrap_mode) -> array
Description: Performs a 2D convolution of an array with a kernel.

[PLACE]
Syntax: PLACE(destination_array, source_array, coordinates_vector) -> array
Description: Places a source array into a destination array at a given coordinate.

[TXTREADER$]
Syntax: TXTREADER$(filename$)
Description: Reads an entire text file into a single string variable.

[TXTWRITER]
Syntax: TXTWRITER filename$, content$
Description: Writes a string variable to a text file.

[CSVREADER]
Syntax: CSVREADER(filename$, [delimiter$], [has_header])
Description: Reads a CSV file into a 2D array of numbers.

[CSVWRITER]
Syntax: CSVWRITER filename$, array, [delimiter$], [header_array]
Description: Writes a 2D array to a CSV file.

[GETENV$]
Syntax: GETENV$(var_name$)
Description: Gets the value of a system environment variable.

[SETLOCALE]
Syntax: SETLOCALE("locale_string")
Description: Sets the locale for number formatting (e.g., "en-US" or "de-DE").

[TICK]
Syntax: TICK()
Description: Returns the number of milliseconds since the program started.

[DATE$]
Syntax: DATE$ / TIME$
Description: Returns the current system date/time as a string.

[TIME$]
Syntax: DATE$ / TIME$
Description: Returns the current system date/time as a string.

[NOW]
Syntax: NOW()
Description: Returns a DateTime object for the current moment.

[DATEADD]
Syntax: DATEADD(part$, num, date)
Description: Adds an interval to a DateTime object. Interval part$: D,H,N,S

[DATEDIFF]
Syntax: DATEDIFF(part$, date1, date2) -> number
Description: Calculates the difference between two dates in the specified unit. Interval part$: D,H,N,S

[CVDATE]
Syntax: CVDATE(date_string$)
Description: Converts a string ("YYYY-MM-DD") to a DateTime object.

[HTTP.GET$]
Syntax: HTTP.GET$(url$)
Description: Performs an HTTP GET request and returns the response body as a string.

[HTTP.POST$]
Syntax: HTTP.POST$(url$, data$, contentType$)
Description: Performs an HTTP POST request with the given data and content type, returning the response body.

[HTTP.PUT$]
Syntax: HTTP.PUT$(url$, data$, contentType$)
Description: Performs an HTTP PUT request.

[HTTP.POST_ASYNC]
Syntax: HTTP.POST_ASYNC(url$, data$, contentType$)
Description: Performs an HTTP POST request asynchronously, returning a task handle that can be used with AWAIT.

[HTTP.SETHEADER]
Syntax: HTTP.SETHEADER(name$, value$)
Description: Sets a custom header for subsequent HTTP requests.

[HTTP.CLEARHEADERS]
Syntax: HTTP.CLEARHEADERS()
Description: Clears all custom HTTP headers.

[HTTP.STATUSCODE]
Syntax: HTTP.STATUSCODE()
Description: Returns the HTTP status code from the last request.

[HTTP.SERVER.START]
Syntax: HTTP.SERVER.START(port)
Description: Starts a non-blocking HTTP server on the specified port.

[HTTP.SERVER.STOP]
Syntax: HTTP.SERVER.STOP
Description: Stops the running HTTP server.

[HTTP.SERVER.ON_GET]
Syntax: HTTP.SERVER.ON_GET(path$, function_name$)
Description: Registers a function to handle incoming GET requests.

[HTTP.SERVER.ON_POST]
Syntax: HTTP.SERVER.ON_POST(path$, function_name$)
Description: Registers a function to handle incoming POST requests.

[TYPEOF]
Syntax: TYPEOF(AnyVar)
Description: Returns the type of an object as string.

[THREAD.ISDONE]
Syntax: THREAD.ISDONE(handle)
Description: Returns TRUE if the background thread associated with the handle has finished its execution.

[THREAD.GETRESULT]
Syntax: THREAD.GETRESULT(handle)
Description: Waits for the thread to complete and returns its result. This is a blocking call.

[ASYNC]
Syntax: ASYNC FUNC FUNCTIONNAME(args)
Description: Marks a function as asynchronius.

[AWAIT]
Syntax: AWAIT task
Description: Waits for the given task to be completed and returns the result of the function.

[GRAPHICS COMMANDS]
Syntax: SCREEN, SCREENFLIP, DRAWCOLOR, SETFONT, PSET, LINE, RECT, CIRCLE, TEXT, PLOTRAW
Description: Functions for opening a graphics window and drawing shapes and text.

[SOUND COMMANDS]
Syntax: SOUND.INIT, SOUND.VOICE, SOUND.PLAY, SOUND.RELEASE, SOUND.STOP, SFX.LOAD, FX.PLAY, MUSIC.PLAY, MUSIC.STOP
Description: Functions for initializing the sound system, configuring voices, and playing notes and sound effects.

[SPRITE & MAP COMMANDS]
Syntax: SPRITE., MAP.
Description: A suite of commands for loading and managing sprites, animations, and tile maps from the Tiled editor. Includes functions for movement, collision detection, and drawing.

[TURTLE GRAPHICS]
Syntax: TURTLE.*
Description: A suite of commands for turtle graphics, allowing for path-based drawing. Includes functions for movement, pen control, and color.

[TENSOR & AI FUNCTIONS]
Syntax: TENSOR.*
Description: A comprehensive suite of functions for creating, training, and running neural networks. Includes core tensor operations, layer creation, optimizers, training loops (BACKWARD/UPDATE), and helpers for building LLMs and CNNs.

[CREDITS]
Syntax: No Command :-)
Description: Thanks to Volker and Achim (aka Atomi) for developing this.