std
assert
fun assert(bool condition, str? message = null) > void
If condition is false print message and exit program
message: message printed ifconditionis false
fun print(str value) > void
Prints value on stdout
value: value to print
parseInt
fun parseInt(str string) > int?
Parse number, returns null if string does not represent a number
string: string to parse
Returns: integer parsed or null
parseDouble
fun parseDouble(str string) > double?
Parse number, returns null if string does not represent a number
string: string to parse
Returns: double parsed or null
toInt
fun toInt(double n) > int
Cast double to a integer value
n: value to cast
Returns: casted value
toDouble
fun toDouble(int n) > double
Cast integer to a double value
n: value to cast
Returns: casted value
toUd
fun toUd(any n) > ud
Cast number to a userdata
n: value to cast
parseUd
fun parseUd(str string) > ud?
Parse ud, returns null if string does not represent a ud (u64)
string: string to parse
Returns: ud parsed or null
Returns: casted value
char
fun char(int byte) > str
Return ascii char for given byte
random
fun random(int? min = null, int? max = null) > int
Return evenly distributed random number between min and max
min: Minimum value, if omitted0max: Maximum value, if omittedmin + 1
Returns: Random value
currentFiber
fun currentFiber() > fib<any, any?>
Returns: the current fiber
panic
fun panic(str message) > void
Print message and exit program
