global

Global names that are available everywhere.

Summary
globalGlobal names that are available everywhere.
Types
BooleanTRUE or FALSE.
NumberFloating point number with 34 decimal digits of precision.
StringUnicode string.
ArrayParameterised sequence type.
DictionaryParameterised map type from String to the given type.
BytesBytes.
Exceptions
ArrayIndexExceptionAn array index is not valid or out of range.
AssertFailedExceptionAssert failed.
ByteOutOfRangeExceptionA byte is out of range in toBytes().
DictionaryIndexExceptionA dictionary index value does not exist.
DivideByZeroExceptionDivide by zero.
EndOfFileExceptionEnd of input file.
FormatExceptionFormat specifier not valid.
InvalidFunctionExceptionAn invalid function pointer was called.
InvalidValueExceptionAn invalid value was passed to a library function.
FunctionNotFoundExceptionFunction not found.
LibraryNotFoundExceptionLibrary not found.
SqlExceptionSQL exception.
StackOverflowExceptionCall stack exceeded limit.
Utf8DecodingExceptionInvalid UTF-8 encoding found in Bytes.decodeToString().
ValueRangeExceptionAn input value is out of range.
Functions
chrConvert a number to the corresponding Unicode character.
concatConcatenate two strings.
concatBytesConcatenate two bytes.
formatFormat a string based on the formatting mini-language.
inputRead a line of input from the terminal after printing a prompt.
intTruncate a floating point number to the nearest integer whose absolute value is closest to zero.
maxReturn the greater of two numbers.
minReturn the lesser of two numbers.
numConvert a decimal number as a string to a number.
oddReturn TRUE if the given number is odd.
ordReturn the Unicode value of a given character.
printPrint a string to standard output followed by a newline.
strConvert a number to a decimal string.
strbConvert a boolean to a string, either TRUE or FALSE.
substringReturn a range of a string with the given offset and length.

Types

Boolean

TRUE or FALSE.

Number

Floating point number with 34 decimal digits of precision.

String

Unicode string.

Array

Parameterised sequence type.  Example

Array<String>

Dictionary

Parameterised map type from String to the given type.  Example

Dictionary<String>

Bytes

Bytes.

Exceptions

ArrayIndexException

An array index is not valid or out of range.

AssertFailedException

Assert failed.

ByteOutOfRangeException

A byte is out of range in toBytes().

DictionaryIndexException

A dictionary index value does not exist.

DivideByZeroException

Divide by zero.

EndOfFileException

End of input file.

FormatException

Format specifier not valid.

InvalidFunctionException

An invalid function pointer was called.

InvalidValueException

An invalid value was passed to a library function.

FunctionNotFoundException

Function not found.

LibraryNotFoundException

Library not found.

SqlException

SQL exception.

StackOverflowException

Call stack exceeded limit.

Utf8DecodingException

Invalid UTF-8 encoding found in Bytes.decodeToString().

ValueRangeException

An input value is out of range.

Functions

chr

DECLARE NATIVE FUNCTION chr(x: Number): String

Convert a number to the corresponding Unicode character.

concat

DECLARE NATIVE FUNCTION concat(a: String,
b: String): String

Concatenate two strings.  Same as the & operator.

concatBytes

DECLARE NATIVE FUNCTION concatBytes(a: Bytes,
b: Bytes): Bytes

Concatenate two bytes.  Same as the & operator for Bytes.

format

DECLARE NATIVE FUNCTION format(str: String,
fmt: String): String

Format a string based on the formatting mini-language.

TODO

input

DECLARE NATIVE FUNCTION input(prompt: String): String

Read a line of input from the terminal after printing a prompt.

int

DECLARE NATIVE FUNCTION int(a: Number): Number

Truncate a floating point number to the nearest integer whose absolute value is closest to zero.

max

DECLARE NATIVE FUNCTION max(a: Number,
b: Number): Number

Return the greater of two numbers.

min

DECLARE NATIVE FUNCTION min(a: Number,
b: Number): Number

Return the lesser of two numbers.

num

DECLARE NATIVE FUNCTION num(s: String): Number

Convert a decimal number as a string to a number.

odd

DECLARE NATIVE FUNCTION odd(x: Number): Boolean

Return TRUE if the given number is odd.

ord

DECLARE NATIVE FUNCTION ord(s: String): Number

Return the Unicode value of a given character.  The input string must be a single character.

print

DECLARE NATIVE FUNCTION print(s: String)

Print a string to standard output followed by a newline.

str

DECLARE NATIVE FUNCTION str(x: Number): String

Convert a number to a decimal string.

strb

DECLARE NATIVE FUNCTION strb(x: Boolean): String

Convert a boolean to a string, either TRUE or FALSE.

substring

DECLARE NATIVE FUNCTION substring(s: String,
offset: Number,
length: Number): String

Return a range of a string with the given offset and length.

Unicode string.
DECLARE NATIVE FUNCTION chr(x: Number): String
Convert a number to the corresponding Unicode character.
DECLARE NATIVE FUNCTION concat(a: String,
b: String): String
Concatenate two strings.
DECLARE NATIVE FUNCTION concatBytes(a: Bytes,
b: Bytes): Bytes
Concatenate two bytes.
DECLARE NATIVE FUNCTION format(str: String,
fmt: String): String
Format a string based on the formatting mini-language.
DECLARE NATIVE FUNCTION input(prompt: String): String
Read a line of input from the terminal after printing a prompt.
DECLARE NATIVE FUNCTION int(a: Number): Number
Truncate a floating point number to the nearest integer whose absolute value is closest to zero.
DECLARE NATIVE FUNCTION max(a: Number,
b: Number): Number
Return the greater of two numbers.
DECLARE NATIVE FUNCTION min(a: Number,
b: Number): Number
Return the lesser of two numbers.
DECLARE NATIVE FUNCTION num(s: String): Number
Convert a decimal number as a string to a number.
DECLARE NATIVE FUNCTION odd(x: Number): Boolean
Return TRUE if the given number is odd.
DECLARE NATIVE FUNCTION ord(s: String): Number
Return the Unicode value of a given character.
DECLARE NATIVE FUNCTION print(s: String)
Print a string to standard output followed by a newline.
DECLARE NATIVE FUNCTION str(x: Number): String
Convert a number to a decimal string.
DECLARE NATIVE FUNCTION strb(x: Boolean): String
Convert a boolean to a string, either TRUE or FALSE.
DECLARE NATIVE FUNCTION substring(s: String,
offset: Number,
length: Number): String
Return a range of a string with the given offset and length.
Bytes.
Close