#DELETE (delete a multi-valued symbol instance) 

Top  Previous  Next

 

#DELETE( symbol [, position ] )

#DELETE

Deletes the value from one instance of a multi-valued user-defined symbol.

symbol

A multi-valued user-defined symbol.

position

An integer constant or symbol containing the instance number in the symbol. Instance numbering begins with one (1). If omitted, the default is the current fixed instance.

The #DELETE statement deletes the value from one instance of a multi-valued user-defined symbol. If there are any symbols dependent upon the symbol, they are also cleared. If this is the last instance in the symbol, the instance is removed. You can get the current instance number to which a symbol is fiXEd by using the INSTANCE(%symbol) built-in template procedure.

Example:

#DECLARE(%ProcFilesPrefix),MULTI    #!Declare multi-valued symbol

#ADD(%ProcFilesPrefix,'SAV')        #!Add a value

#ADD(%ProcFilesPrefix,'BAK')        #!Add a value

#ADD(%ProcFilesPrefix,'PRE')        #!Add a value

#ADD(%ProcFilesPrefix,'QUE')        #!Add a value

#!%ProcFilesPrefix contains: SAV, BAK, PRE, QUE

#DELETE(%ProcFilesPrefix,1)         #!Delete first value (SAV)

#!%ProcFilesPrefix contains: BAK, PRE, QUE

#FIX(%ProcFilesPrefix,'PRE')        #!Fix to a value

#DELETE(%ProcFilesPrefix)           #!Delete it

#!%ProcFilesPrefix contains: BAK, QUE

 

See Also:     #DECLARE ,#ADD