Numeric (ScreenField property)

From m204wiki
Revision as of 19:49, 20 November 2012 by JAL (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

The Numeric 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

%currentBoolean A Boolean enumeration to get the current value of the Numeric attribute applicable to sfield. Valid values are True and False (default).
sfield A reference to an instance of a ScreenField object.
newBoolean A Boolean enumeration to set the new value for the Numeric attribute applicable to sfield. Valid values are True and False (default)

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. A value is numeric only if it is composed of the characters 0 through 9, plus (+), minus (-), or period (.).

See also