Zyxonia/Common Command List
Jump to navigation
Jump to search
Here are more analyzation for every command.
System command control
do SubroutineName Indicates the beginning of a subroutine (or function). end Indicates the end of a subroutine (or function). CLS Clear the screen. BYE Exit the programming environment directly. EXIT Terminate the program immediately.
Variable operations
LET name(type) <- value Declare a variable and assign a value to it. If the variable type is omitted, it becomes a direct assignment. You can change its type with another type as its value, assign a blank value to indicate no value, and assign a value with DEL to indicate deletion.
I/O
LET name <- INPUT(__prompt) Takes an input from the user and assigns it to a variable. The input must match the variable type. You can also enter a string with RAW_INPUT instead of INPUT. PRINT(value, END <- "") Outputs the specified value, ending with END. If there is only one value, feel free to omit the parentheses. filename |> INPUT Read data from filename in read-only mode. It is possible to change filename to CON to redirect to standard input. If filename does not exist, an error occurs. filename <| PRINT Write data to filename in append mode. If you add another vertical bar(fioename <|| PRINT), it means write-only mode (in this case, the contents of the filename will be cleared and then written, while the append mode will not clear the contents). If filename does not exist, a new file is created for writing instead of an error. Redirecting to CON will set the output to standard output.
Preprocessors
#INCLUDE<lib_name> Introduce lib_name. All content is imported by default, and the standard library name and module name need to be added. #INCLUDE<module>FROM<lib> Import module from lib. The two modules are separated by a comma. #IF condition If the conditions are met, add the code to the processed code file. #ELSE If all the conditions of the IF block and ELIF block are not met, the code in the ELSE block is added. #ELIF condition Another condition. #ERROR error It produces an error. This will make the compilation process incomplete.