$Lstr Global Del and $Lstr Session Del: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
Line 11: Line 11:


==Syntax==
==Syntax==
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Lstr_Global_Del</span>(<span class="term">name)
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Lstr_Global_Del</span>(<span class="term">name</span>)
</p>
</p>
<p>
 
</p>
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Lstr_Session_Del</span>(<span class="term">name</span>)
<p>%RC is set to number of deleted global longstrings.</p>
<p class="code">  
%RC = $Lstr_Session_Del(name)
</p>
<p>
</p>
</p>
<p>%RC is set to the number of deleted session longstrings.</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:
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:


<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%rc</th>
<td>Set to the number of deleted global or session longstrings.</td></tr>
<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>
 
<tr><th>?</th>
<tr><th>?</th>
<td>Matches any single character</td></tr>
<td>Matches any single character</td></tr>
Line 34: Line 31:
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
<td>Indicates that the next character must be treated literally even if it is a wildcard character.
</td></tr></table>
</td></tr></table>
For example,
 
<p class="code"> %RC = $Lstr_Global_Del('TYRANNOSAURUS')
==Examples==
<ol>
<li>To delete only a global longstring named <code>TYRANNOSAURUS</code>:
<p class="code">%RC = $Lstr_Global_Del('TYRANNOSAURUS')
</p>
</p>
would only delete a global longstring named &amp;OSQ.TYRANNOSAURUS&amp;CSQ..
 
<p class="code"> %RC = $Lstr_Global_Del('STEG*')
<li>To delete global longstrings named <code>STEG</code>, <code>STEGOSAURUS</code>,and <code>STEG.DATA</code>, if they existed:
<p class="code">%RC = $Lstr_Global_Del('STEG*')
</p>
</p>
would delete globals longstrings named &amp;OSQ.STEG&amp;CSQ., &amp;OSQ.STEGOSAURUS&amp;CSQ. and &amp;OSQ.STEG.DATA&amp;CSQ. if they existed.
 
<p class="code"> %RC = $Lstr_Session_Del('ST??')
<li>To delete session longstrings named <code>STAN</code>, <code>STEP</code>, and <code>STUN.DATA</code>, if they existed:
<p class="code">%RC = $Lstr_Session_Del('ST??')
</p>
</p>
would delete session longstrings named &amp;OSQ.STAN&amp;CSQ., &amp;OSQ.STEP&amp;CSQ. and &amp;OSQ.STUN.DATA&amp;CSQ. if they existed.
 
<p class="code"> %RC = $Lstr_Global_Del('"**')
<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>
</p>
would delete globals longstrings named &amp;OSQ.*&amp;CSQ., &amp;OSQ.*LOOK&amp;CSQ. and &amp;OSQ.*ZAP.DATA&amp;CSQ. if they existed.
 
<p class="code"> %RC = $Lstr_Session_Del('*')
<li>To delete all session longstrings:
<p class="code">%RC = $Lstr_Session_Del('*')
</p>
</p>
would delete all session longstrings.
</ol>


When a <var>$Lstr_Global_Del</var> or <var>$Lstr_Session_Del</var> 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
==Usage notes==
<ul>
<li>When a <var>$Lstr_Global_Del</var> or <var>$Lstr_Session_Del</var> 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:


<p class="code"> %RC = $Lstr_Global(%DINO, 'VELOCIRAPTOR')
<p class="code">%RC = $Lstr_Global(%DINO, 'VELOCIRAPTOR')
%DINO = 'FLINTSTONES'
%DINO = 'FLINTSTONES'
%RC = $Lstr_Global_Del('VEL*')
%RC = $Lstr_Global_Del('VEL*')
</p>
</p>


the longstring %DINO is set to null and is no longer bound to a global longstring. <var>$Lstr_Global_Del</var> does not distinguish among the manner in which a global longstring was created; it will delete any longstring created with <var>$Lstr_Global</var> or $Lstr_Global_Set. Similarly, <var>$Lstr_Session_Del</var> will delete any session longstring created either by <var>$Lstr_Session</var> or $Lstr_Session_Set.  
the longstring %DINO is set to null and is no longer bound to a global longstring. <var>$Lstr_Global_Del</var> does not distinguish among the manner in which a global longstring was created; it will delete any longstring created with <var>$Lstr_Global</var> or $Lstr_Global_Set. Similarly, <var>$Lstr_Session_Del</var> will delete any session longstring created either by <var>$Lstr_Session</var> or $Lstr_Session_Set.  


A <var>$Lstr_Session_Del</var> call when there is no session open causes a request cancellation. For more information about sessions see [[Sessions|"Sessions"]].  
<li>A <var>$Lstr_Session_Del</var> call when there is no session open causes a request cancellation. For more information about sessions see [[Sessions|"Sessions"]].
</ul>


==Products authorizing $Lstr_Global_Del and $Lstr_Session_Del==
==Products authorizing $Lstr_Global_Del and $Lstr_Session_Del==

Revision as of 00:19, 19 July 2013

$Lstr_Global_Del and $Lstr_Session_Del

Note: Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $Lstr_Global_Del and $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.

The argument is the name of the global or session longstring or longstrings to be deleted. This argument can contain wildcard characters as described below. This is a required argument and cannot be a null string.

Syntax

%rc = $Lstr_Global_Del(name)

%rc = $Lstr_Session_Del(name)

The name specified for $Lstr_Global_Del or $Lstr_Session_Del can be an explicit name or it can contain the following wildcard characters:

%rc Set to the number of deleted global or session longstrings.
* Matches any number of characters including none.
? Matches any single character
" Indicates that the next character must be treated literally even if it is a wildcard character.

Examples

  1. To delete only a global longstring named TYRANNOSAURUS:

    %RC = $Lstr_Global_Del('TYRANNOSAURUS')

  2. To delete global longstrings named STEG, STEGOSAURUS,and STEG.DATA, if they existed:

    %RC = $Lstr_Global_Del('STEG*')

  3. To delete session longstrings named STAN, STEP, and STUN.DATA, if they existed:

    %RC = $Lstr_Session_Del('ST??')

  4. To delete global longstrings named *, *LOOK, and *ZAP.DATA, if they existed:

    %RC = $Lstr_Global_Del('"**')

  5. 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:

    %RC = $Lstr_Global(%DINO, 'VELOCIRAPTOR') %DINO = 'FLINTSTONES' %RC = $Lstr_Global_Del('VEL*')

    the longstring %DINO is set to null and is no longer bound to a global longstring. $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".

Products authorizing $Lstr_Global_Del and $Lstr_Session_Del