Points= Window/Print Format Option
Obsolete
This option is obsolete. This format option is valid only in character-mode DataFlex. In DataFlex, you can use the Field_Mask property of the DataDictionary class or the Currency_Mask method.
Purpose
To restrict keyboard input to a window to numeric characters and operators, and to specify the number of places to the right of the decimal point to be contained in the window.
Syntax
entry_item
file.field
{points=
# [ , ..., options]
}
# is a literal number from 0 to 8.
What It Does
When points= is used on an entry_item, format, or print command line, it rejects non-numeric keyboard entries to the item and displays numbers with n places to the right of the decimal.
Using {points=#} makes the window numeric. If you subsequently try to input letters into the window, the computer will beep.
entry_item empl.pay {points=2}
In this example, an entry to the item connected to Fieldpay in Database File empl is truncated to two digits to the right of the decimal point.
format history.2 thru history.4 {points=2}
In this example, the second through fourth windows in Imagehistory are defined to truncate all entries in them to two decimals to the right of the decimal point.
points= does not round numbers—it truncates. entry_item and print commands, however, handle expressions, so an expression to round can be included in such commands.
Notes
-
The value
points=0will cause the window to accept integer values only. This is the easiest way to create a single-character numeric window. -
points=may not be used as a format option onentry_itemcommand lines in any class of object that can be scrolled. The option is supported only in theentry_formclass. If the option is required in classes of other types, it may be applied to windows through the use of the format command.