BEE Variable is a three-tier structure: class, name, and element. (Details can be found in the BEE Script User Reference - PDF.) There is only one data structure - array. No pointers and data type constraints, everything is purely "string macros".
The variable is named in the form of "class%name:element". Variable value is indicated by a pair of curly brackets surrounding the variable name, like "{class%name:element}".
Note: In this document, italic strings are user-defined names.
The variable value is evaluated by BEE at run-time and substitute it with its literal value recursively. This mechanism is called "string macro":
var abc = "myvalue"; // {abc} -> myvalue // {abc:} -> myvalue var xyz = "abc"; // {xyz} -> abc // {{xyz}} -> {abc} -> myvalue var abc:april = "fool"; // {abc:april} -> fool var abc:may = "flower"; // {abc:may} -> flower // {abc|list} -> =>'myvalue',april=>'fool',may=>'flower' // {{xyz}|list} -> {abc|list} var yourval = "{abc}"; // {yourval} -> {yourval:} -> myvalue // {yourval|list} -> =>myvalue var def = (var)abc; // {def} -> {def:} -> myvalue // {def|list} -> =>myvalue,april=>fool,may=>flower
Please note that the double quotation marks surrounding the values (the right-hand-side of the assignment) are optional unless the value contains white spaces. Also, you may use either double quotation mark or single quotation mark to quote the value. This is useful if the value contains quotation marks already, in such case you just use another type of quotation marks to quote the entire value. (You may also escape the quotation marks by preceding them with ''.)
|