The set statement, sets a preprocessor variable to a value. The values of preprocessor variables are not bound to types.
%set VERSION 0.7.1%%set APPLICATION_NAME My Application%
Some variables are set by the Hades interpreter.
The operating system, a script is being ran on (can be: NT, Mac, Linux, Other)
The version of the operating system as int (417, 1803, 10136, etc...)
The version of the Hades interpreter the script is being ran on as int
if-elif-fi block has a couple special commands to compare values to each other.
Returns true if
Variables are equal
Variables are not equal
First variable is greater than second variable
First variable is lower than second variable
Greater or equals
First variable is greater or equal to second variable
Lower or equals
First variable is lower or equal to second variable
with os from std:oswith console from std:iovar listCommand%if eq OS Windows%listCommand = "dir"%else if eq OS Linux%listCommand = "ls"%else%console->out:"OS not recognized!"os->exit(-1)&fi%%if ge OS_VERSION 1803%os->exec("wslpath 'c:\users'")%fi%os->exec(listCommand)
The import statement copies the content of the specified file and pastes it into the source code (works recursively).
func print(args a)for(var arg in a)console->out:argendend
class printer%import function.hd%end
with console from std:io%import classDef.hd%printer()->print("Hello","world")
main.hd is being converted to:
with console from std:ioclass printerfunc print(args a)for(var arg in a)console->out:argendendendprinter()->print("Hello","world")