BEE Variables
Username:  
Password:
  > Home
v User Guide
    v Introduction
       o To Write a BEE Web Page
       o BEE Variables
       o BEE Conversions
    > Hello World
    > Flow Control
    > Function Calls
    > Authentication
    > Database access
    > Content Management
    > Remote Calling
    > Object-Oriented
    > Other Features
> Reference
> Portal Object
> Development Guide


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> User Guide >> Introduction >> BEE Variables <=  =>      <  1  >  
BEE Variables

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 ''.)

 

Previous Page       Next Page

Accsoft Computer Technology Pty Ltd     ABN: 98 065 617 549
PO Box 892, Epping NSW 1710         Level 1, Epping Office Park, 242 Beecroft Rd, Epping NSW 2121, Australia
Tel: Sydney - (02)98691668     National - 1300-881668         Fax: (02)98691866
© Copyright 2003 Accsoft Computer Technology Pty Ltd