$Lstr: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Treat a string as longstring<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Treat a string as longstring<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Lstr function is [[to be entered]].</p>
<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>


This function takes a string or longstring input and produces a longstring output.  
This function takes a string or longstring input and produces a longstring output.  
Line 9: Line 9:


The first argument is an arbitrary string or longstring.
The first argument is an arbitrary string or longstring.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %STR = $Lstr(longstring)
<p class="syntax"><section begin="syntax" /> %STR = $Lstr(longstring)
Line 15: Line 16:
</p>
</p>
<p class="caption">%STR is a copy of longstring.</p>
<p class="caption">%STR is a copy of longstring.</p>


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.
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.
For example,
For example,
<p class="code"> IF %COMEDIANS EQ (%WHO WITH ' Costello')
<p class="code"> IF %COMEDIANS EQ (%WHO WITH ' Costello')
</p>
</p>
would truncate (%WHO WITH 'Costello') at 255 bytes before the comparison even if %COMEDIANS is a LONGSTRING %variable but
would truncate (%WHO WITH 'Costello') at 255 bytes before the comparison even if %COMEDIANS is a LONGSTRING %variable but
<p class="code"> IF %COMEDIANS EQ $Lstr(%WHO WITH ' Costello')
<p class="code"> IF %COMEDIANS EQ $Lstr(%WHO WITH ' Costello')
</p>
</p>
would not.  
would not.  
For more information see :hdref refid=lstr..


$Lstr is only available in ''[[Sirius Mods]]'' Version 6.2 and later.<p>
$Lstr is only available in ''[[Sirius Mods]]'' Version 6.2 and later.<p>

Revision as of 20:29, 10 February 2011

<section begin="desc" />Treat a string as longstring<section end="desc" />

Most Sirius $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.

The $Lstr function accepts one argument and returns a longstring result.

The first argument is an arbitrary string or longstring.

Syntax

<section begin="syntax" /> %STR = $Lstr(longstring) <section end="syntax" />

$Lstr Function

%STR is a copy of longstring.

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. For example,

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

would truncate (%WHO WITH 'Costello') at 255 bytes before the comparison even if %COMEDIANS is a LONGSTRING %variable but

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

would not.

$Lstr is only available in Sirius Mods Version 6.2 and later.

Products authorizing $Lstr