16 lines
517 B
Plaintext
16 lines
517 B
Plaintext
# Simple assignements are used so that rvalues are parsed as TEXT values
|
|
$code=fn.println(Hello World!)
|
|
# Returns VOID unless return or throw is explicitly used
|
|
fn.exec($code)
|
|
|
|
$code=return Hello World!
|
|
fn.println(fn.exec($code))
|
|
|
|
$code=throw $LANG_ERROR_DIV_BY_ZERO
|
|
# Will print "Dividing by 0" in the Standard Lang implementation (Error texts are not standardized)
|
|
fn.println(fn.errorText(fn.exec($code)))
|
|
|
|
$code=parser.op(20//0)
|
|
# Will return VOID because no error was thrown explicitly
|
|
fn.println(fn.exec($code))
|