clear
Username:  
Password:
  > Home
> User Guide
v Reference
    > Introduction
    > CROFT
    > BEE Variables
    > BEE Syntax
    v BEE Commands
       v Variable Operations
          o var
          o link
          o clear
          o group
       > Conditional
       > Loop
       > Module Calling
       > Remote Calling
       > Authentication
       > Data Access
       > Socket
       > Special Functions
    > Database Operation
    > Content Management
    > Objects and Classes
    > Interface with others
    o Glossary
> Portal Object
> Development Guide


Shortcuts
sys Class
debug Class
Intrinsic Conversions
>> Reference >> BEE Commands >> Variable Operations >> clear <=  =>      <  1  >  
clear – undefine a variable

BEE Script:   clear var;

 

BEE Tag:     <beeclear "var">

 

Clearing a variable means to remove the variable from the Context so that it will not be defined in the Context anymore.  It is different from assigning a blank to it.  An element containing a blank will still appear in, say, a "foreach" loop and be counted as an element in the sizeof ('#') operation, but a cleared element will not because it does not exist anymore.

You can clear the entire array by omitting the element part.  You can even clear the entire class (except for system classes) by omitting both the name and element parts.

Example:

clear abc:xyz;                        // Clear value%abc:xyz

clear abc:;                        // Clear value%abc: (the default elemnent)

clear abc;                        // Clear value%abc (the entire array)

clear myclass%;                        // Clear myclass% (the entire class)

 

Not all variables can be cleared.  Please see "System Classes" for details.

Please note that if the variable has more than one Reference to it, clearing one Reference does not remove the others.  Please see "link" for more details.

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