Numeric (ScreenField property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{Template:ScreenField:Numeric subtitle}}
This property sets or returns the Numeric attribute for a ScreenField. If a field is Numeric, only numeric values may be entered in the field. The Numeric attribute is
This property sets or returns the Numeric attribute for a ScreenField. If a field is Numeric, only numeric values may be entered in the field. The Numeric attribute is
initially set for a field by the [[Screen class#AddField function|AddField method]].
initially set for a field by the [[Screen class#AddField function|AddField method]].
==Syntax==
==Syntax==
{{Template:ScreenField:Numeric syntax}}
===Syntax terms===
===Syntax terms===
<dl>
<dl>
Line 10: Line 13:
</dl>
</dl>


==Usage Notes==
==Usage notes==


Regardless of the value of a field's Numeric attribute, the programmer can assign any type of value to the field. Enforcement of the Numeric attribute takes place only when a user enters data in the field. Some terminal emulators do not enforce numeric field restrictions, so the programmer should be aware that the value of a numeric field must still be checked for validity.
Regardless of the value of a field's Numeric attribute, the programmer can assign any type of value to the field. Enforcement of the Numeric attribute takes place only when a user enters data in the field. Some terminal emulators do not enforce numeric field restrictions, so the programmer should be aware that the value of a numeric field must still be checked for validity.
==See also==
{{Template:ScreenField:Numeric footer}}

Revision as of 20:24, 18 March 2011

Set or return the numeric attribute for screenfield (ScreenField class)


This property sets or returns the Numeric attribute for a ScreenField. If a field is Numeric, only numeric values may be entered in the field. The Numeric attribute is initially set for a field by the AddField method.

Syntax

%currentBoolean = sfield:Numeric sfield:Numeric = newBoolean

Syntax terms

bool
A Boolean enumeration. Valid values are True (default) and False. A value is numeric only if it is composed of the characters 0 through 9, plus (+), minus (-), or period (.).
%sfield
A reference to an instance of a ScreenField object.

Usage notes

Regardless of the value of a field's Numeric attribute, the programmer can assign any type of value to the field. Enforcement of the Numeric attribute takes place only when a user enters data in the field. Some terminal emulators do not enforce numeric field restrictions, so the programmer should be aware that the value of a numeric field must still be checked for validity.

See also