Basic Functions and Operators
Before going in note that any time VARNAME or FUNCNAME is written, it means a variable or function in the form Collection@Variableor a literal.
call
Syntax:
if
Syntax:
==, !=, <, >, <=, >=.
Syntax:
Prints the value of VARNAME to the console.
input
Syntax:
Gets user input from the console with prompt VARNAME2 and stores the result in VARNAME1.
timeit
Syntax:
loop
Syntax:
Loops from VARNAME1 to VARNAME2 (end value exclusive) and calls FUNCNAME in each iteration.
until_break
Syntax:
Loops until breaking and calls FUNCNAME in each iteration.
break
Syntax:
Exits the current loop immediately.
Variable Cloning
Syntax:
Clones the value of VARNAME2 into VARNAME1. This used when needing to temporarily store a value before modifying it, such as with a counter.
exec
Syntax:
Executes the commandline command in the string VARNAME2, outputs result to VARNAME1
Types
Syntax:
All variables are typed, if the type (_) is used the type is inferred, otherwise its explicit.
wait
Syntax:
Pauses execution for the number of seconds specified in VARNAME.
Legacy Shorthand Operator
Syntax:
The shorthand ? is used for the current collection instead of writing out the full name. This has been replaced by just typing the variable name without collection name or @, this feature is depreceated but has been left in for backwards compatibility.
free
Syntax:
Frees the variable VARNAME from memory, allowing it to be reused. Useful for memory management.
exit
Syntax:
Exits the program forcefully
fwrite
Syntax:
Writes the contents of the string VARNAME2 to the file at path VARNAME1, replacing the files contents and creating the file if it does not exist
fread
Syntax:
Reads the contents of the file at path VARNAME2, returning the result to VARNAME1
t_spawn
Syntax:
Spawns the function VARNAME2 in a thread, returning the thread ID to VARNAME1
t_join
Syntax:
Waits for the thread with id VARNAME2 to end, returning a bool for success
parse
Syntax:
Parses the string representation of a variable of a different type to that type. For example "100" becomes the number 100.