-
Notifications
You must be signed in to change notification settings - Fork 0
The Reflection Standard Library
C272 edited this page Aug 30, 2019
·
2 revisions
Library which allows for the creation and manipulation of variables at runtime.
Gets the value of a variable given it's name.
Parameters:
Name | Description |
---|---|
x | The variable name to fetch. |
Usage:
let x = 3;
print gvar("x"); //3
Creates a variable given it's name.
Parameters:
Name | Description |
---|---|
x | The variable name to create. |
val | The value to assign the variable. |
Usage:
cvar("x", 3);
print x; //3
Sets the value of a variable given it's name.
Parameters:
Name | Description |
---|---|
x | The variable name to set. |
val | The value to assign to the variable. |
Usage:
let x = 3;
svar("x", 5);
print x; //5
Deletes an existing variable.
Parameters:
Name | Description |
---|---|
x | The variable name to delete. |
Usage:
let x = 3;
dvar("x");
print x; //error, x no longer exists
Algo (c) Larry Tang, 2019.
Commercial use of Algo must include the LICENSE
file in the same directory as the executable.
Standard Library Documentation: