$Lstr Global Del and $Lstr Session Del: Difference between revisions
(Automatically generated page update) |
m (misc formatting and links) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
<span class="pageSubtitle">$Lstr_Global_Del and $Lstr_Session_Del</span> | <span class="pageSubtitle">$Lstr_Global_Del and $Lstr_Session_Del</span> | ||
<p class="warn"><b>Note: </b> | <p class="warn"><b>Note:</b> Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the <var>$Lstr_Global_Del</var> nor the <var>$Lstr_Session_Del</var> function.</p> | ||
These functions delete one or more global or session longstrings that were created with either <var>$Lstr_Global_Set</var>, <var>$Lstr_Session_Set</var>, <var>$Lstr_Global</var>, or <var>$Lstr_Session</var> in the current or any previous <var class="product">User Language</var> program. It returns the number of deleted entries. | These functions delete one or more global or session longstrings that were created with either <var>$Lstr_Global_Set</var>, <var>$Lstr_Session_Set</var>, <var>$Lstr_Global</var>, or <var>$Lstr_Session</var> in the current or any previous <var class="product">User Language</var> program. It returns the number of deleted entries. | ||
<var>$Lstr_Global_Del</var> and <var>$Lstr_Session_Del</var> accept one argument and return a numeric result. | <var>$Lstr_Global_Del</var> and <var>$Lstr_Session_Del</var> accept one argument and return a numeric result. | ||
==Syntax== | ==Syntax== | ||
Line 19: | Line 17: | ||
<table> | <table> | ||
<tr><th>%rc</th> | <tr><th>%rc</th> | ||
<td>Set to the number of deleted global or session | <td>Set to the number of deleted global or session Longstrings.</td></tr> | ||
<tr><th>name</th> | <tr><th>name</th> | ||
<td>A string that contains the name of the global or session | <td>A string that contains the name of the global or session [[Longstrings|Longstring]] that is to be deleted. This is a required argument and it cannot be a null string. | ||
<p> | <p> | ||
The name specified for <var>$Lstr_Global_Del</var> or <var>$Lstr_Session_Del</var> can be an explicit name or it can contain the following wildcard characters:</p> | The name specified for <var>$Lstr_Global_Del</var> or <var>$Lstr_Session_Del</var> can be an explicit name or it can contain the following wildcard characters:</p> | ||
<table> | <table class="thJustBold"> | ||
<tr><th>*</th> | <tr><th>*</th> | ||
<td>Matches any number of characters including none.</td></tr> | <td>Matches any number of characters including none.</td></tr> | ||
Line 51: | Line 49: | ||
</p> | </p> | ||
<li>To delete global longstrings named <code>*</code>, <code>*LOOK<code>, and <code>*ZAP.DATA</code>, if they existed: | <li>To delete global longstrings named <code>*</code>, <code>*LOOK</code>, and <code>*ZAP.DATA</code>, if they existed: | ||
<p class="code">%RC = $Lstr_Global_Del('"**') | <p class="code">%RC = $Lstr_Global_Del('"**') | ||
</p> | </p> | ||
Line 77: | Line 75: | ||
<ul class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
<li>[[ | <li>[[Sirius Functions]]</li> | ||
<li>[[Fast/Unload User Language Interface]]</li> | <li>[[Fast/Unload User Language Interface]]</li> | ||
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> | <li>[[Media:JoclrNew.pdf|Janus Open Client]]</li> |
Latest revision as of 16:09, 9 April 2018
$Lstr_Global_Del and $Lstr_Session_Del
Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $Lstr_Global_Del nor the $Lstr_Session_Del function.
These functions delete one or more global or session longstrings that were created with either $Lstr_Global_Set, $Lstr_Session_Set, $Lstr_Global, or $Lstr_Session in the current or any previous User Language program. It returns the number of deleted entries.
$Lstr_Global_Del and $Lstr_Session_Del accept one argument and return a numeric result.
Syntax
%rc = $Lstr_Global_Del(name)
%rc = $Lstr_Session_Del(name)
%rc | Set to the number of deleted global or session Longstrings. | ||||||
---|---|---|---|---|---|---|---|
name | A string that contains the name of the global or session Longstring that is to be deleted. This is a required argument and it cannot be a null string.
The name specified for $Lstr_Global_Del or $Lstr_Session_Del can be an explicit name or it can contain the following wildcard characters:
|
Examples
- To delete only a global longstring named
TYRANNOSAURUS
:%RC = $Lstr_Global_Del('TYRANNOSAURUS')
- To delete global longstrings named
STEG
,STEGOSAURUS
,andSTEG.DATA
, if they existed:%RC = $Lstr_Global_Del('STEG*')
- To delete session longstrings named
STAN
,STEP
, andSTUN.DATA
, if they existed:%RC = $Lstr_Session_Del('ST??')
- To delete global longstrings named
*
,*LOOK
, and*ZAP.DATA
, if they existed:%RC = $Lstr_Global_Del('"**')
- To delete all session longstrings:
%RC = $Lstr_Session_Del('*')
Usage notes
- When a $Lstr_Global_Del or $Lstr_Session_Del is issued against a global or session longstring that is bound to a longstring in the current request, the longstring is unbound and its contents set to null. For example, after the following sequence of statements the longstring
%dino
is set to null and is no longer bound to a global longstring:%rc = $Lstr_Global(%dino, 'VELOCIRAPTOR') %dino = 'FLINTSTONES' %rc = $Lstr_Global_Del('VEL*')
$Lstr_Global_Del does not distinguish among the manner in which a global longstring was created; it will delete any longstring created with $Lstr_Global or $Lstr_Global_Set. Similarly, $Lstr_Session_Del will delete any session longstring created either by $Lstr_Session or $Lstr_Session_Set.
- A $Lstr_Session_Del call when there is no session open causes a request cancellation. For more information about sessions, see Sessions.