Skip to main content


Removes the named variable and deallocates dynamic-array storage space.


Erase varname


The Erase statement has the following argument:

varname The name of the variable to be erased.


The Erase statement removes the variable and all descended nodes.

Erase may be used to insure that a variable has no defined value, such as when a named variable is used as a placeholder in an argument list.


The following example uses Erase to remove an array and its subnodes:

array = "root node"
array("subnode") = "subnode"
array("subnode", "subnode") = "subnode, subnode"
Println Exists(array) 'returns 3; variable defined and has array elements
Erase array 
Println Exists(array) 'returns 0

The following example uses Erase to specify an explicitly undefined placeholder variable:

  Erase blankvar
  tStatement = New %SQL.Statement(blankvar,"Sample")
  PrintLn "Success"

See Also

FeedbackOpens in a new tab