$Lstr Global Del and $Lstr Session Del: Difference between revisions
m (1 revision) |
m (1 revision) |
||
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="warning">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.</p> | <p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the <var>$Lstr_Global_Del</var> and <var>$Lstr_Session_Del</var> function.</p> | ||
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 <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 $LSTR_GLOBAL_SET, $Lstr_Session_SET, $LSTR_GLOBAL, or $LSTR_SESSION 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 $Lstr_Session_Del 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. | ||
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. | 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. | ||
Line 24: | Line 24: | ||
The name specified for $Lstr_Global_Del or $Lstr_Session_Del 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"> | ||
Line 51: | Line 51: | ||
would delete all session longstrings. | would delete all session longstrings. | ||
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 | 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') | ||
Line 58: | Line 58: | ||
</p> | </p> | ||
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. | 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 $Lstr_Session_Del call when there is no session open causes a request cancellation. For more information about sessions see [[Sessions|"Sessions"]]. | 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 class="smallAndTightList"> | <ul class="smallAndTightList"> | ||
Line 75: | Line 75: | ||
</p> | </p> | ||
<p class="caption">Products authorizing $Lstr_Global_Del and $Lstr_Session_Del | <p class="caption">Products authorizing <var>$Lstr_Global_Del</var> and $Lstr_Session_Del | ||
</p> | </p> | ||
[[Category:$Functions|$Lstr_Global_Del and $Lstr_Session_Del]] | [[Category:$Functions|$Lstr_Global_Del and $Lstr_Session_Del]] |
Revision as of 18:03, 19 October 2012
$Lstr_Global_Del and $Lstr_Session_Del
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
<section begin="syntax" />%rc = $Lstr_Global_Del(name) <section end="syntax" />
%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:
* | 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. |
For example,
%RC = $Lstr_Global_Del('TYRANNOSAURUS')
would only delete a global longstring named &OSQ.TYRANNOSAURUS&CSQ..
%RC = $Lstr_Global_Del('STEG*')
would delete globals longstrings named &OSQ.STEG&CSQ., &OSQ.STEGOSAURUS&CSQ. and &OSQ.STEG.DATA&CSQ. if they existed.
%RC = $Lstr_Session_Del('ST??')
would delete session longstrings named &OSQ.STAN&CSQ., &OSQ.STEP&CSQ. and &OSQ.STUN.DATA&CSQ. if they existed.
%RC = $Lstr_Global_Del('"**')
would delete globals longstrings named &OSQ.*&CSQ., &OSQ.*LOOK&CSQ. and &OSQ.*ZAP.DATA&CSQ. if they existed.
%RC = $Lstr_Session_Del('*')
would delete all session longstrings.
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".