All Bundles
Runtime
Provides access to runtime system
Operations
Assert
Asserts runtime value to be true. If false, program exits with stack trace.
function : Assert(assert:Bool) ~ Nil
Parameters
Name | Type | Description |
---|
assert | Bool | value to assert |
Command
Executes a system command
function : Command(n:System.String) ~ Int
Parameters
Name | Type | Description |
---|
n | String | system command |
Return
Type | Description |
---|
Int | command status code |
CommandOutput
Executes a system command
function : CommandOutput(n:System.String) ~ System.String[]
Parameters
Name | Type | Description |
---|
n | String | system command |
Return
Type | Description |
---|
String[] | output from command |
Copy
Copies data between two byte arrays
function : Copy(dest:Byte[], dest_offset:Int, src:Byte[], src_offset:Int, len:Int) ~ Bool
Parameters
Name | Type | Description |
---|
dest | Byte[] | destination array |
dest_offset | Int | destination array copy offset |
src | Byte[] | source array |
src_offset | Int | source array copy offset |
len | Int | number of bytes to copy |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Copies data between two character arrays
function : Copy(dest:Char[], dest_offset:Int, src:Char[], src_offset:Int, len:Int) ~ Bool
Parameters
Name | Type | Description |
---|
dest | Char[] | destination array |
dest_offset | Int | destination array copy offset |
src | Char[] | source array |
src_offset | Int | source array copy offset |
len | Int | number of characters to copy |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Copies data between two integer arrays
function : Copy(dest:Int[], dest_offset:Int, src:Int[], src_offset:Int, len:Int) ~ Bool
Parameters
Name | Type | Description |
---|
dest | Int[] | destination array |
dest_offset | Int | destination array copy offset |
src | Int[] | source array |
src_offset | Int | source array copy offset |
len | Int | number of values to copy |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Copies data between two Base arrays
function : Copy(dest:Base[], dest_offset:Int, src:Base[], src_offset:Int, len:Int) ~ Bool
Parameters
Name | Type | Description |
---|
dest | Base[] | destination array |
dest_offset | Int | destination array copy offset |
src | Base[] | source array |
src_offset | Int | source array copy offset |
len | Int | number of values to copy |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Copies data between two Compare arrays
function : Copy(dest:Compare[], dest_offset:Int, src:Compare[], src_offset:Int, len:Int) ~ Bool
Parameters
Name | Type | Description |
---|
dest | Compare[] | destination array |
dest_offset | Int | destination array copy offset |
src | Compare[] | source array |
src_offset | Int | source array copy offset |
len | Int | number of values to copy |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Copies data between two float arrays
function : Copy(dest:Float[], dest_offset:Int, src:Float[], src_offset:Int, len:Int) ~ Bool
Parameters
Name | Type | Description |
---|
dest | Float[] | destination array |
dest_offset | Int | destination array copy offset |
src | Float[] | source array |
src_offset | Int | source array copy offset |
len | Int | number of values to copy |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Exit
Causes the executing program to halt
function : Exit(code:Int) ~ Nil
Parameters
Name | Type | Description |
---|
code | Int | exit code |
GetInstallDir
Returns the installation directory
function : GetInstallDir() ~ String
Return
Type | Description |
---|
String | installation directory |
GetPlatform
Returns an OS platform string
function : GetPlatform() ~ String
Return
Type | Description |
---|
String | OS platform string |
GetProperty
Fetches a runtime property. System properties include: 'user_dir', temp_dir and 'install_dir'.
function : GetProperty(key:String) ~ String
Parameters
Name | Type | Description |
---|
key | String | property key |
Return
Type | Description |
---|
String | runtime property |
GetTempDir
Returns the system's temporary directory
function : GetTempDir() ~ String
Return
Type | Description |
---|
String | system's temporary directory |
GetTime
Returns the current time
function : GetTime(gmt:Bool) ~ Time.Date
Parameters
Name | Type | Description |
---|
gmt | Bool | true of time is in GMT, false for system time zone |
Return
Type | Description |
---|
Date | current time |
GetUserDir
Returns the current user's working directory
function : GetUserDir() ~ String
Return
Type | Description |
---|
String | current user's working directory |
GetVersion
Returns the package version string
function : GetVersion() ~ String
Return
Type | Description |
---|
String | package version string |
HasProperty
Checks if a property exists
function : HasProperty(key:String) ~ Bool
Parameters
Name | Type | Description |
---|
key | String | property key |
Return
Type | Description |
---|
Bool | true if it exists, false otherwise |
RaiseSignal
Raises a system signal
function : RaiseSignal(type:Runtime->Signal) ~ Nil
Parameters
Name | Type | Description |
---|
type | Runtime->Signal | signal type |
SetLocale
Sets the runtime locale
function : SetLocale(locale:String) ~ Nil
Parameters
SetProperty
Sets a runtime property
function : SetProperty(key:String, value:String) ~ Nil
Parameters
Name | Type | Description |
---|
key | String | property key |
value | String | property value |
SetSignal
Sets a system signal
function : SetSignal(type:Runtime->Signal, func:(Int)~Nil) ~ Nil
Parameters
Name | Type | Description |
---|
type | Runtime->Signal | signal type |
func | (Int)~Nil | function handler for signal |