description |
---|
Intrinsics are low-level operations that are natively supported in REDscript. |
Intrinsic | Type | Description |
---|---|---|
Equals | (A, A) -> Bool | Equality check (for references, enums, strings and booleans) |
NotEquals | (A, A) -> Bool | Inequality check (same as above) |
IsDefined |
| Null check |
ToString | (A) -> String | String conversion |
EnumInt | (A) -> Int32 | Enum-to-Int32 conversion |
IntEnum | (Int32) -> A | Int32-to-enum conversion |
ToVariant | (A) -> Variant | Variant constructor |
FromVariant | (Variant) -> A | Variant extractor (fails at runtime if the type does not match) |
ArraySize |
| |
ArrayPush | ([A], A) -> Void | Push item on stack (order is LIFO). |
ArrayPop | ([A]) -> A | Pop item from stack (order is LIFO). |
ArrayClear | ([A]) -> Void | |
ArrayResize | ([A], Int32) -> Void | |
ArrayFindFirst |
| |
ArrayFindLast |
| |
ArrayContains |
| |
ArrayCount |
| |
ArraySort | ([A]) -> Void | Only accepts arrays of primitives |
ArrayInsert | ([A], Int32, A) -> Void | |
ArrayRemove | ([A], A) -> Bool | |
ArrayGrow | ([A], Int32) -> Void | |
ArrayErase | ([A], Int32) -> Void | |
ArrayLast |
|
Legend:
[A]
- array of A[A; N]
static array of A with size N