Eas (Easy Application Script) by Molaskes

Syntax Guide:11. Pointers / Variable Variables

[{name string expression}]
‌ Any term in square brackets is evaluated to a string to refer to a variable of that name: ["myvar"] = myvar This way, you can have variables with names that are no valid NIdentifier Names: ["?!#"] -- a valid variable Such variables can only be used in the square bracket form. The expression can be anything: [1+2] -- a variable named "3" Another variable can thus be used as a pointer:
myv "Hello"
p "myv"
SAY:[p]
The third line here uses the variable whose name is stored as the value of p, p is a pointer to myv, and therefore [p] = "Hello".
‌ If the key/pointer is an array, its string rendering will be used:
["a" 2]  =  ["(""a"" 2)"]
Eas:
["this var"]
[myp]
PHP:
$["this var"]
$$myp
11. Pointers / Variable Variables
D Download Eas 4B
C Contact
Esc Search / Table of Contents