$Lstr Get Image and $Lstr Set Image: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 6: Line 6:
<var>$Lstr_Get_Image</var> returns the contents of an image as a longstring. <var>$Lstr_Set_Image</var> sets the contents of an image from a longstring.  
<var>$Lstr_Get_Image</var> returns the contents of an image as a longstring. <var>$Lstr_Set_Image</var> sets the contents of an image from a longstring.  


<var>$Lstr_Get_Image</var> accepts one argument and returns a longstring result. <var>$Lstr_Set_Image</var> accepts two arguments and returns a numeric result.
==Syntax==
<p class="syntax"><section begin="syntax" />%lstr = $Lstr_Get_Image(image)
<section end="syntax" /></p>


The first argument to both <var>$Lstr_Get_Image</var> and <var>$Lstr_Set_Image</var> is a string containing the name of the image to which the function applies. This is a required argument.
<p class="code">%rc = $Lstr_Set_Image(image, value)</p>


The second argument to <var>$Lstr_Set_Image</var> is the longstring from which the image indicated by argument 1 is to be set.
===Syntax terms===
<table class="syntaxTable">
<tr><th>%lstr</th>
<td>A [[Longstrings|longstring]] to receive the contents of the image.</td></tr>


==Syntax==
<tr><th>%rc</th>
<p class="syntax"><section begin="syntax" />%lstr = $Lstr_Get_Image(image)
<td>A numeric variable to receive the count of bytes set in the image.</td></tr>
<section end="syntax" /></p>
 
<p class="caption">$Lstr_Get_Image Function
<tr><th>image</th>
</p>
<td>A string containing the name of the image to which the function applies. This is a required argument.</td></tr>  
<p class="caption">%LSTR is set to the contents of the image.</p>


<p class="code">  
<tr><th>value</th>
%RC = $Lstr_Set_Image(image, value)
<td>The longstring from which the image in the <var class="term">image</var> argument is to be set.</td></tr>
</p>
</table>
<p class="caption">$Lstr_Set_Image Function
</p>
<p class="caption">%RC is set to the bytes set in the image.</p>


<var>$Lstr_Get_Image</var> and <var>$Lstr_Set_Image</var> can be useful for maintaining multiple copies of or versions of an image in a single request, for maintaining one or more global copies of an image (using global LONGSTRINGs) without using the GTBL space required by the standard GLOBAL IMAGE feature and for maintaining copies of an image associated with a session that survives a logout (using session LONGSTRINGs).  
==Usage notes==
<ul>
<li><var>$Lstr_Get_Image</var> and <var>$Lstr_Set_Image</var> can be useful for maintaining :
<ul>
<li>Multiple copies of or versions of an image in a single request
<li>One or more global copies of an image (using global Longstrings) without using the GTBL space required by the standard GLOBAL IMAGE feature
<li>Copies of an image associated with a session that survives a logout (using session Longstrings).  
</ul></ul>


<var>$Lstr_Get_Image</var> and <var>$Lstr_Set_Image</var> are new in Version 6.3 of the <var class="product">[[Sirius Mods]]</var>.<p>


<h2>Products authorizing $Lstr_Get_Image and $Lstr_Set_Image</h2>
<h2>Products authorizing $Lstr_Get_Image and $Lstr_Set_Image</h2>
Line 40: Line 47:
<li>[[Japanese functions]]</li>
<li>[[Japanese functions]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
</ul>
</ul>
   
   
</p>
<p>
</p>


[[Category:$Functions|$Lstr_Get_Image and $Lstr_Set_Image]]
[[Category:$Functions|$Lstr_Get_Image and $Lstr_Set_Image]]

Revision as of 23:17, 25 October 2012

$Lstr_Get_Image and $Lstr_Set_Image: Longstring to/from image

Most Sirius $functions have been deprecated in favor of Object Oriented methods. There are no OO equivalents for the $Lstr_Get_Image and $Lstr_Set_Image functions.

$Lstr_Get_Image returns the contents of an image as a longstring. $Lstr_Set_Image sets the contents of an image from a longstring.

Syntax

<section begin="syntax" />%lstr = $Lstr_Get_Image(image) <section end="syntax" />

%rc = $Lstr_Set_Image(image, value)

Syntax terms

%lstr A longstring to receive the contents of the image.
%rc A numeric variable to receive the count of bytes set in the image.
image A string containing the name of the image to which the function applies. This is a required argument.
value The longstring from which the image in the image argument is to be set.

Usage notes

  • $Lstr_Get_Image and $Lstr_Set_Image can be useful for maintaining :
    • Multiple copies of or versions of an image in a single request
    • One or more global copies of an image (using global Longstrings) without using the GTBL space required by the standard GLOBAL IMAGE feature
    • Copies of an image associated with a session that survives a logout (using session Longstrings).


Products authorizing $Lstr_Get_Image and $Lstr_Set_Image