Skip to content

Commands

Dither Dude edited this page Sep 29, 2024 · 6 revisions

About Commands

This section covers the syntax of the commands used by this program.

Note

This is different to Chains. Check the Chains page for info on those.

Commands lines of code that Heloid understands. Heloid uses commands to process information, perform arithmetic operations, and transfer data. Commands are not case sensitive.


Bool

Tip

🤓 Did you know that in Heloid terms, 0=false and 1=true? It has always annoyed me that C# doesn't allow this, so I decided that my coding language should support this. If it is wanted, i can also make yes and ok be true and no and ko be false.

Adds a boolean variable to the variable list.

Syntax: BOOL <boolName> = true/false/0/1

Note

true and false are not case-sensitive. Heloid Booleans are stored as 0 or 1.

Examples:

BOOL b = false --> Creates a boolean variable named b with a value of 0.

BOOL boolean = 1 --> Creates a boolean variable named boolean with a value of 1.

Warning

If the variable name is already used - even if by a non-boolean variable - Heloid will throw an error.

If the value is not a vaild boolean value, Heloid will throw an error.


CHelp (Chain Help)

Provides help information for Chain(link?) commands.

Syntax:

CHELP [chainCommand]

Examples:

CHELP --> Lists help information for all chain commands.

CHELP LENGTH --> Provides help information for the LENGTH(link?) chain command.


Clear

Clears the CLI screen.

Syntax:

CLEAR <-1>

Examples:

CLEAR --> Clears the console display.

CLEAR superfluousArg --> Clears the CLI, and logs an error due to (an) unnecessary argument(s).


Con

Tip

🤫The name of this command is a reference to the Windows feature that disallows creating a file with the name 'con' on your system.

Works exactly the same as the echo command, but will always output to the CLI, unlike ECHO which, if executed via script, will output to the log file. See echo for syntax and examples.


Double

Tip

🤓 The maximum and minimum values for a double are ±1.7976931348623157E+308. Attempting to exceed this limit will cause Heloid to throw an error.

Adds a double variable to the variable list.

Syntax: DOUBLE <doubleName> = <double>

Examples:

DOUBLE db = 0.125 --> Creates a double variable named db with a value of 0.125.

DOUBLE db0 = apples --> Heloid throws an error.

Warning

If the variable name is already used - even if by a non-double variable - Heloid will throw an error.

If the value is not a vaild double value, Heloid will throw an error.


Echo

Prints text to the CLI/log file.

Caution

If this command is executed via a script (not via CLI), the output will be echoed to the log file - NOT to the CLI.

Syntax: ECHO <text> --> Echoes the text from <text> to the CLI/log file.

Note

Unlike other commands, the ECHO command is sensetive to spaces within the <text> field.

Examples:

ECHO Hello, World! --> Echoes Hello, World!

ECHO Did you know that the ECHO command doesn't trim spaces between words?

--> Echoes Did you know that the ECHO command doesn't trim spaces between words?


Exit (unsafe)

Exits the CLI

Caution

This command can only be run in unsafe mode (link?).

Syntax:

!EXIT <-1>

Examples:

!EXIT --> Exits the CLI.

EXIT --> CLI will not exit. Error is displayed about not being run in unsafe mode.

!EXIT superfluousArg --> Exits the CLI. Would log an error if the program is still running, but it isn't.

Clone this wiki locally