Note that this only changes the behavior of non-constant variables. For optimization purposes, and since constants can't be modified, accessing an element on a constant array still transpiles to the value they were given on initialization.
rule("") {
Actions {
Set Global Variable At Index(A, 1, Append To Array(Append To Array(Append To Array(Empty Array, 0), Null), Null));
Value In Array(Value In Array(Global Variable(A)), 1, 0);
Value In Array(Value In Array(Global Variable(A)), 1, 1);
Value In Array(Value In Array(Global Variable(A)), 1, 2);
0;
Null;
False;
}
}
... instead of a stack of
Value In Array(...)
sNote that this only changes the behavior of non-constant variables. For optimization purposes, and since constants can't be modified, accessing an element on a constant array still transpiles to the value they were given on initialization.
Example
transpiles to
Fixes #31