$Lstr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(26 intermediate revisions by 4 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Treat a string as longstring</span>
<span class="pageSubtitle">Treat a string as longstring</span>


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


This function takes a string or longstring input and produces a longstring output.
This function takes a <var>String</var> or <var>Longstring</var> input and produces a <var>Longstring</var> output.  
 
The <var>$Lstr</var> function accepts one argument and returns a longstring result.
 
The first argument is an arbitrary string or longstring.


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" />%STR = $Lstr(longstring)
<p class="syntax"><span class="term">%longstr</span> = <span class="literal">$Lstr</span>(<span class="term">longstring</span>)
<section end="syntax" /></p>
<p>
</p>
</p>
<p class="caption">%STR is a copy of longstring.</p>


The main utility of the <var>$Lstr</var> function is to force a STRING WITH expression that is its argument to be upgraded to a LONGSTRING WITH expression.
<p>
For example,
<var class="term">%longstr</var> is a copy of <var class="term">longstring</var>.</p>


<p class="code"> IF %COMEDIANS EQ (%WHO WITH ' Costello')
The <var class="term">longstring</var> argument is an arbitrary string or longstring.
</p>


would truncate (%WHO WITH 'Costello') at 255 bytes before the comparison even if %COMEDIANS is a LONGSTRING %variable but
==Usage notes==
<ul>
<li>The main utility of the <var>$Lstr</var> function is to force a STRING WITH expression that is its argument to be upgraded to a LONGSTRING WITH expression.
</ul>


<p class="code"> IF %COMEDIANS EQ $Lstr(%WHO WITH ' Costello')
==Example==
For example,
<p class="code">IF %COMEDIANS EQ (%WHO WITH ' Costello')
</p>
</p>
truncates <code>%WHO WITH 'Costello'</code> at 255 bytes before the comparison, even if <code>%COMEDIANS</code> is a LONGSTRING %variable.
However, this statement does not:
<p class="code">IF %COMEDIANS EQ $Lstr(%WHO WITH ' Costello')</p>


would not.
==Products authorizing {{PAGENAMEE}}==
 
<ul class="smallAndTightList">
<var>$Lstr</var> is only available in <var class="product">[[Sirius Mods]]</var> Version 6.2 and later.<p>
<li>[[List of $functions|Sirius functions]]</li>
 
<h2>Products authorizing {{PAGENAMEE}}</h2><ul class="smallAndTightList">
<li>[[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>
   
   
</p>
<p>
</p>
[[Category:$Functions|$Lstr]]
[[Category:$Functions|$Lstr]]

Latest revision as of 22:51, 20 September 2018

Treat a string as longstring

Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $Lstr function.

This function takes a String or Longstring input and produces a Longstring output.

Syntax

%longstr = $Lstr(longstring)

%longstr is a copy of longstring.

The longstring argument is an arbitrary string or longstring.

Usage notes

  • The main utility of the $Lstr function is to force a STRING WITH expression that is its argument to be upgraded to a LONGSTRING WITH expression.

Example

For example,

IF %COMEDIANS EQ (%WHO WITH ' Costello')

truncates %WHO WITH 'Costello' at 255 bytes before the comparison, even if %COMEDIANS is a LONGSTRING %variable. However, this statement does not:

IF %COMEDIANS EQ $Lstr(%WHO WITH ' Costello')

Products authorizing $Lstr