Cold Help System: Programming: ColdC Reference Manual: Functions: Variable: clear_var()


INTEGER clear_var(SYMBOL name)

This function clears the instance of an object variable, on a descendant. The variable specified by name must be defined on the same ancestor defining the method which is calling clear_var(). If not, the error ~varnf is thrown. If this function is not called before an an ancestor is removed, variables defined on that ancestor and set on the current object will remain (due to encapsulation). This function is also useful in reducing database usage, as a cleared variable takes up no space, where a set variable (even to a value of 0) does. Upon successful execution clear_var() returns 1.

See the section Objects and Variables for more information on the instance of an object variable.


add_var() | clear_var() | del_var() | get_var() | set_var() | variables()


the Cold Dark