$Screen clear: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$Screen_clear}} <span class="pageSubtitle">Clear tagged and/or modified attributes in a screen</span> This function clears the tagged and/or modified attribute...")
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
<span class="pageSubtitle">Clear tagged and/or modified attributes in a screen</span>
<span class="pageSubtitle">Clear tagged and/or modified attributes in a screen</span>


This function clears the tagged and/or modified attributes for all items in a screen. While it might be useful in some normal full-screen applications, it is probably most useful in applications that receive output from a non-full-screen source but populate a screen from that source, in order to be able to use legacy full-screen code. When the legacy code has produced an updated version of the screen, the code communicating with the external source would probably want to clear the tagged and/or modified bits, just as a [[Full-screen feature#READ_SCREEN_statement|Read Screen]] statement would.
This function clears the tagged and/or modified attributes for all items in a screen. While it might be useful in some normal full-screen applications, it is probably most useful in applications that receive output from a non-full-screen source but populate a screen from that source, in order to be able to use legacy full-screen code.  
 
<p>When the legacy code has produced an updated version of the screen, the code communicating with the external source should probably clear the tagged and/or modified bits, just as a [[Full-screen feature#READ_SCREEN_statement|Read Screen]] statement would.</p>


Under Model 204 7.8 and later, $Screen_clear is [[Calling Sirius Mods $functions|callable]].
Under Model 204 7.8 and later, $Screen_clear is [[Calling Sirius Mods $functions|callable]].
==Syntax==
==Syntax==
<p class="syntax">[%one =] $Screen_clear(scr_item, [mod_or_tag])
<p class="syntax">[<span class="term">%one</span> =] $Screen_clear(<span class="term">scr_item</span>, [<span class="term">mod</span>|<span class="term">tag</span>])
</p>
</p>
===Syntax terms===
===Syntax terms===
Line 13: Line 15:
<td>This function always returns 1.</td></tr>
<td>This function always returns 1.</td></tr>
<tr><th>scr_item</th>
<tr><th>scr_item</th>
<td>The screen item in the screen for which attributes are to be cleared. This can be a variable of the form <i>%screen:item</i> or a [[Full-screen feature#Screen_item_name_variables|screen item name variable]] of the form <i>:%string</i>.</td></tr>
<td>The screen item in the screen for which attributes are to be cleared. This can be a variable of the form <var class="term">%screen:item</var> or a [[Full-screen feature#Screen_item_name_variables|screen item name variable]] of the form <var class="term">:%string</var>.</td></tr>
<tr><th>mod_or_tag</th>
<tr><th>mod or tag</th>
<td>Indicates the attributes to be cleared. If the string <i>'TAG'</i> is specified, only the tagged attributes are cleared. If the string <i>'MOD'</i> only the modified attributes are cleared. If any other value is specified, including no value, both tagged and modified attributes are cleared.  
<td>A string indicating the attributes to be cleared. The string for <var class="term">mod</var> clears only the modified attributes, and the string for <var class="term">tag</var> clears only the tagged attributes. If any other value is specified, including no value, both modified and tagged attributes are cleared.  
</table>
</table>


==Examples==
==Example==
<ol>
This code fragment clears the modified attribute for screen <code>foo</code> (which contains screen item <code>bar</code>):
<li>This code fragment clears the modified attribute for screen <code>foo</code> (which contains screen item <code>bar</code>):
<p class="code">%rc = $screen_clear(%foo:bar, "MOD")
<p class="code">%rc = $screen_clear(%foo:bar, "MOD")
</p>
</p>
</ol>
 
[[Category:$Functions|$Screen_clear]]
[[Category:$Functions|$Screen_clear]]

Latest revision as of 18:59, 1 June 2017

Clear tagged and/or modified attributes in a screen

This function clears the tagged and/or modified attributes for all items in a screen. While it might be useful in some normal full-screen applications, it is probably most useful in applications that receive output from a non-full-screen source but populate a screen from that source, in order to be able to use legacy full-screen code.

When the legacy code has produced an updated version of the screen, the code communicating with the external source should probably clear the tagged and/or modified bits, just as a Read Screen statement would.

Under Model 204 7.8 and later, $Screen_clear is callable.

Syntax

[%one =] $Screen_clear(scr_item, [mod|tag])

Syntax terms

%one This function always returns 1.
scr_item The screen item in the screen for which attributes are to be cleared. This can be a variable of the form %screen:item or a screen item name variable of the form :%string.
mod or tag A string indicating the attributes to be cleared. The string for mod clears only the modified attributes, and the string for tag clears only the tagged attributes. If any other value is specified, including no value, both modified and tagged attributes are cleared.

Example

This code fragment clears the modified attribute for screen foo (which contains screen item bar):

%rc = $screen_clear(%foo:bar, "MOD")