ActionKey (Screen function): Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 14: | Line 14: | ||
===ActionKey enumeration=== | ===ActionKey enumeration=== | ||
Valid values of this [[Enumerations|enumeration]] are <var>Enter</var> and <var>Pf1</var>, <var>Pf2</var>, and so on through <var>Pf24</var>. The value that is set initially is <var>Enter</var>. | Valid values of this [[Enumerations|enumeration]] are <var>Enter</var> and <var>Pf1</var>, <var>Pf2</var>, and so on through <var>Pf24</var>. The value that is set initially is <var>Enter</var>. | ||
Besides the [[#Common Enumeration methods|common enumeration methods]], the | |||
<var>ActionKey</var> enumeration has an additional method available (<var>ToNumber</var>), as | |||
described in the following section. | |||
====ToNumber function==== | |||
This function converts <var>ActionKey</var> enumeration values to a numeric value: the integer that remains after the key name is stripped of its "PF" prefix. For <var>Enter</var>, the numeric value is 0. These values are useful in a value-testing loop in conjunction with the <var class="product">User Language</var> <var>Jump</var> statement. | |||
====ToNumber syntax==== | |||
<p class="syntax"> <span class="term">%num</span> <span class="literal">= </span><span class="term">key</span><span class="literal">:ToNumber</span> | |||
</p> | |||
====Syntax terms==== | |||
<table class="syntaxTable"> | |||
<tr><th>%num</th> | |||
<td>A number variable that is assigned the integer part of the action key name. | |||
</td></tr> | |||
<tr><th>key</th> | |||
<td>An <var>ActionKey</var> enumeration variable or expression. | |||
</td></tr></table> | |||
==Usage notes== | ==Usage notes== | ||
<ul><li>You can use the <var>ActionKey</var> | <ul><li>You can use the <var>ActionKey</var> enumeration <var>ToNumber</var> method to convert <var>ActionKey</var> enumeration values to a numeric value: the integer that remains after the key name is stripped of its "PF" prefix. For <var>Enter</var>, the numeric value is 0. These values are useful in a value-testing loop in conjunction with the <var class="product">User Language</var> <var>Jump</var> statement. | ||
</ul> | </ul> | ||
==See also== | ==See also== | ||
{{Template:Screen:ActionKey footer}} | {{Template:Screen:ActionKey footer}} |
Revision as of 01:25, 17 August 2011
Return name of key that activated last screen read (Screen class)
The ActionKey read-only property returns an ActionKey enumeration which is the keyboard key that activated the last screen read.
Syntax
%key = screen:ActionKey
Syntax terms
%key | A declared ActionKey enumeration value (see below). |
---|---|
screen | A reference to an instance of a Screen object. |
ActionKey enumeration
Valid values of this enumeration are Enter and Pf1, Pf2, and so on through Pf24. The value that is set initially is Enter.
Besides the common enumeration methods, the ActionKey enumeration has an additional method available (ToNumber), as described in the following section.
ToNumber function
This function converts ActionKey enumeration values to a numeric value: the integer that remains after the key name is stripped of its "PF" prefix. For Enter, the numeric value is 0. These values are useful in a value-testing loop in conjunction with the User Language Jump statement.
ToNumber syntax
%num = key:ToNumber
Syntax terms
%num | A number variable that is assigned the integer part of the action key name. |
---|---|
key | An ActionKey enumeration variable or expression. |
Usage notes
- You can use the ActionKey enumeration ToNumber method to convert ActionKey enumeration values to a numeric value: the integer that remains after the key name is stripped of its "PF" prefix. For Enter, the numeric value is 0. These values are useful in a value-testing loop in conjunction with the User Language Jump statement.