$DELG: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
mNo edit summary
 
Line 80: Line 80:
<p class="code">REMAINING=ENTRY
<p class="code">REMAINING=ENTRY
</p>
</p>
<p>For a full discussion of global variables refer to [[Global Features#Global Features|Global Features]].</p>
<p>For a full discussion of global variables refer to [[Global features]].</p>
 
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Latest revision as of 19:51, 2 January 2014

Deletes information stored in the global variable table by a $SETG function in the same or an earlier request.

The syntax of the $DELG function is:

$DELG('globalvariable[*]')

Where:

globalvariable[*] specifies the name of the global variable to delete.

You can specify the optional wildcard suffix, an asterisk (*), to delete all global variables with the same common prefix. You cannot delete all global variables by specifying the wildcard suffix only.

$DELG returns a completion code indication success or failure of the operation. Possible codes are:

Code Meaning
0 Successful. Global variable(s) deleted.
1 Not found. No global variable found that matches the supplied argument.
2 Unsuccessful.

Examples

Assuming the global variable table has been populated as follows:

%RC = $SETG('GVAR','DATA') %RC = $SETG('GVAR1','DATA1') %RC = $SETG('DELETE','TARGET') %RC = $SETG('GVAR2','DATA2') %RC = $SETG('REMAINING','ENTRY') %RC = $SETG('GVAR3','DATA3')

Then the following $DELG functions return:

Function Returns... And...

%RC=$DELG()

1 Does not alter the global variable table

%RC=$DELG('DELETE')

0 Removes the entry DELETE from the global variable table

%RC=$DELG('NOTFOUND')

1 Does not alter the variable table

%RC=$DELG('GVAR*')

0 Removes all GVARn entries, including GVAR, from the global variable table

%RC=$DELG('*')

1 Does not alter the global variable table

The resulting global variable table is:

REMAINING=ENTRY

For a full discussion of global variables refer to Global features.