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

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
(12 intermediate revisions by the same user not shown)
Line 2: Line 2:
<span class="pageSubtitle">$Lstr_Global_Get and $Lstr_Session_Get</span>
<span class="pageSubtitle">$Lstr_Global_Get and $Lstr_Session_Get</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalent for the $Lstr_Global_Get and $Lstr_Session_Get functions.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalent for the $Lstr_Global_Get and $Lstr_Session_Get functions.</p>


This function retrieves the value of a global or [[Sessions|session]] longstring. If the global or session longstring has never been set it returns a null.  
This function retrieves the value of a global or [[Sessions|session]] longstring. If the global or session longstring has never been set it returns a null.  
Line 38: Line 38:
==Products authorizing $Lstr_Global_Get and $Lstr_Session_Get==
==Products authorizing $Lstr_Global_Get and $Lstr_Session_Get==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[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>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
</ul>
</ul>
   
   


[[Category:$Functions|$Lstr_Global_Get and $Lstr_Session_Get]]
[[Category:$Functions|$Lstr_Global_Get and $Lstr_Session_Get]]

Latest revision as of 22:52, 20 September 2018

$Lstr_Global_Get and $Lstr_Session_Get

Note: Many $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalent for the $Lstr_Global_Get and $Lstr_Session_Get functions.

This function retrieves the value of a global or session longstring. If the global or session longstring has never been set it returns a null.

Syntax

%lstr = $Lstr_Global_Get(gname)

%lstr = $Lstr_Session_Get(gname)

Syntax terms

%lstr A longstring set to the value of the global or session longstring.
gname A string containing the name of the global or session longstring. This is a required argument.

Usage notes

  • $Lstr_Global_Get and $Lstr_Session_Get are roughly analogous to the $GETG function for longstrings. $Lstr_Global_Get and $Lstr_Session_Get will return the current value of a global or session longstring whether or not that longstring is bound in the current request via $Lstr_Global or $Lstr_Session. However, if a global or session longstring value is to be retrieved and updated frequently in a request it is generally better to bind that longstring to a %variable using $Lstr_Global or $Lstr_Session.
  • $Lstr_Global_Get and $Lstr_Session_Get have independent namespaces. That is, the same name used for $Lstr_Global_Get and $Lstr_Session_Get reference different longstrings. A $Lstr_Session_Get call when there is no session open causes a request cancellation.
  • While the $Lstr_Global_Get and $Lstr_Session_Get are longstring capable the global names themselves cannot be longer than 255 bytes. An attempt to use a longer name results in a request cancellation truncation error.
  • You can clean up any global longstrings with $Lstr_Global_Del and any session longstrings with $Lstr_Session_Del.

Example

In the following example, the value of the global longstring named POLLY is retrieved into the longstring %PARROT.

%PARROT = $Lstr_Global_Get('POLLY')

Products authorizing $Lstr_Global_Get and $Lstr_Session_Get