core.ql
| Function | Description |
|---|---|
| native fun print(obj) | Prints a string representation of the given object to the console, followed by a newline character. |
| native fun readLine() | Reads a line of input from the console. |
| fun printf(obj, formatParams) | Prints a given string to the console, followed by a newline character. The string is formatted with string.format using the parameters provided. |
| native fun getEnv(name) | Gets the environment variable of a given name. This will return a string, or throw an error if it can't be found. |
| fun getEnv(name, default) | Gets the environment variable of a given name. If the value is not found, a default value is returned. |
| native fun hasEnv(name) | Checks if an environment variable is set. |
| native fun currentTimeMillis() | Gets the current time in milliseconds |
| native fun exit(code) | Exits the program with the given exit code. |
Prints a string representation of the given object to the console, followed by a newline character.
obj
|
The object to print, of any type. |
Prints a given string to the console, followed by a newline character. The string is formatted with string.format using the parameters provided.
obj
|
The object to print, of any type. |
Gets the environment variable of a given name. If the value is not found, a default value is returned.
name
( string )
|
The name of the environment variable to get |
defaultValue
( string )
|
The default value to return if the environment variable is not found |
The value of the environment variable