Special Functions¶
Contents
Print Functions¶
- print([object], ...) [void]
Prints its arguments, seperated by tabs, to standard output. The strings that are printed are the equivelent of calling the
string
conversion function. This function will not automatically add a newline. To get this behavior, useprintln
- println([object], ...) [void]
Prints its arguments, the same as
print
, exceptprintln
appends a newline at the end.
- printr([object], ...) [void]
Prints its arguments, the same as
print
, exceptprintr
appends a carriage return at the end.
- eprint([object], ...) [void]
The equivelent of
print
, but outputs to standard error instead of standard output.
- eprintln([object], ...) [void]
The equivelent of
println
, but outputs to standard error instead of standard output.
- eprintr([object], ...) [void]
The equivelent of
printr
, but outputs to standard error instead of standard output.
Special Functions¶
- exit([int]) [void]
Exit from a running script with a given error code (0 indicates success)
- lock([object]) [void]
Lock an object as immutable permenantly, so future mutations will throw an error.
- hash([object]) [int]
Returns the 64-bit unsigned integer hash corresponding to an object.
hash
will throw an error if the object is not hashable.
- clone([object]) [object]
Will create a deep-clone of an object, if possible. The clone will be unlocked and mutation will be allowed.
clone
will throw an error if the object is not cloneable.
- assert([bool], [string]?) [void]
Assert a condition, with an optional message in case the condition fails.
- tech_version() ([int], [int], [int])¶
Returns the major, minor and patch version of technetium.
- script_path() [string]
Returns the absolute (canonicalized) path to the current running script. Throws an error if this doesn’t make sense (i.e. if the script is passed via stdin).
- sleep([int or float]) [void]
Returns after waiting a given number of seconds.