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

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 80: Line 80:
<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>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>

Revision as of 22:38, 19 February 2015

$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)

%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.

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

* 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 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.

Products authorizing $Lstr_Global_Del and $Lstr_Session_Del