$ImgOvl: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(38 intermediate revisions by 3 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Replace image item value</span>
<span class="pageSubtitle">Replace image item value</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $ImgOvl 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 $ImgOvl function.</p>


The $ImgOvl function accepts three arguments and returns a 0. All errors cause request cancellation.  
The $ImgOvl function accepts three arguments and returns a 0. All errors cause request cancellation.  


==Syntax==
<p class="syntax"><span class="term">%result</span> = <span class="literal">$ImgOvl</span>(<span class="term">image_identifier</span>, <span class="term">item_name</span>, <span class="term">value</span>)
</p>
<p>
<var class="term">%result</var> is always set to 0.</p>
The first argument is either a string that contains an image name or any image item in the source image. If an image item is specified, only the image portion is relevant for this function since the second argument indicates the actual item that is to be updated. Nevertheless, it is more efficient to specify an image item rather than an image name unless the image name itself is to be variable at run time. This is because an image name must be hashed and then NTBL must be searched for the hash value, both moderately expensive operations. This is a required parameter.  
The first argument is either a string that contains an image name or any image item in the source image. If an image item is specified, only the image portion is relevant for this function since the second argument indicates the actual item that is to be updated. Nevertheless, it is more efficient to specify an image item rather than an image name unless the image name itself is to be variable at run time. This is because an image name must be hashed and then NTBL must be searched for the hash value, both moderately expensive operations. This is a required parameter.  


Line 12: Line 18:
The third argument is a value that is to be assigned to the indicated image item. This is a required parameter.
The third argument is a value that is to be assigned to the indicated image item. This is a required parameter.


==Syntax==
==Usage notes==
<p class="syntax"><section begin="syntax" /> %RESULT = $ImgOvl(image_identifier, item_name, value)
<var>$ImgOvl</var> is provided to get around the fact that <var class="product">Model 204</var> has no support for image name variables like it has support for screen name variables. That is, if the image or image item that is to be updated is unknown at compile time, $ImgOvl can be used to update the image data based on values set at evaluation time.
<section end="syntax" /></p>
<p class="caption">$ImgOvl Function
</p>
<p class="caption">%RESULT is always set to 0.</p>
 
$ImgOvl is provided to get around the fact that <var class="product">Model 204</var> has no support for image name variables like it has support for screen name variables. That is, if the image or image item that is to be updated is unknown at compile time, $ImgOvl can be used to update the image data based on values set at evaluation time.


==Examples==
For example
For example
<p class="code"> %RC = $ImgOvl(%RECTYPE, 'NAME', %NAME)
<p class="code">%RC = $ImgOvl(%RECTYPE, 'NAME', %NAME)
</p>
</p>
updates the value of an image item called "NAME" from the image associated with the variable %RECTYPE.
updates the value of an image item called "NAME" from the image associated with the variable %RECTYPE.
<p class="code"> %RC = $ImgOvl(%BIGIMG:ID, %FIELD, %VALUE)
<p class="code">%RC = $ImgOvl(%BIGIMG:ID, %FIELD, %VALUE)
</p>
</p>
updates the value of an image item whose name is indicated by %FIELD from the image BIGIMG.  
updates the value of an image item whose name is indicated by %FIELD from the image BIGIMG.  
Line 31: Line 32:
Obviously, if both image and item name are known at evaluation time a simple assignment should be performed as in
Obviously, if both image and item name are known at evaluation time a simple assignment should be performed as in


<p class="code"> %BIGIMG:CUSTID = %DATA
<p class="code">%BIGIMG:CUSTID = %DATA
</p>
</p>


==Products authorizing {{PAGENAMEE}}==
<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>
<p class="caption">Products authorizing $ImgOvl
</p>


[[Category:$Functions|$ImgOvl]]
[[Category:$Functions|$ImgOvl]]

Latest revision as of 22:51, 20 September 2018

Replace image item value

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

The $ImgOvl function accepts three arguments and returns a 0. All errors cause request cancellation.

Syntax

%result = $ImgOvl(image_identifier, item_name, value)

%result is always set to 0.

The first argument is either a string that contains an image name or any image item in the source image. If an image item is specified, only the image portion is relevant for this function since the second argument indicates the actual item that is to be updated. Nevertheless, it is more efficient to specify an image item rather than an image name unless the image name itself is to be variable at run time. This is because an image name must be hashed and then NTBL must be searched for the hash value, both moderately expensive operations. This is a required parameter.

The second argument is a string that contains the name of the image item that is to be updated. This is a required parameter.

The third argument is a value that is to be assigned to the indicated image item. This is a required parameter.

Usage notes

$ImgOvl is provided to get around the fact that Model 204 has no support for image name variables like it has support for screen name variables. That is, if the image or image item that is to be updated is unknown at compile time, $ImgOvl can be used to update the image data based on values set at evaluation time.

Examples

For example

%RC = $ImgOvl(%RECTYPE, 'NAME', %NAME)

updates the value of an image item called "NAME" from the image associated with the variable %RECTYPE.

%RC = $ImgOvl(%BIGIMG:ID, %FIELD, %VALUE)

updates the value of an image item whose name is indicated by %FIELD from the image BIGIMG.

Obviously, if both image and item name are known at evaluation time a simple assignment should be performed as in

%BIGIMG:CUSTID = %DATA

Products authorizing $ImgOvl