HP 3000 Manuals

TOPIC: DATA FORMATTING [ USING VPLUS/V AN INTRO. TO FORMS DESIGN Self-Paced Training Guide ] MPE/iX 5.0 Documentation


USING VPLUS/V AN INTRO. TO FORMS DESIGN Self-Paced Training Guide

TOPIC: DATA FORMATTING 

Data generated by FORMSPEC as an initial value or as a display-only value
is formatted automatically according to certain general rules.  This
formatting depends on the data type.  Table 5-1 summarizes automatic
formatting.  Note that whenever data is moved from one field to another
(with SET TO for example) the data is formatted during the move.  Unless
it is an initial value, is moved, or is specifically formatted by a
formatting command, user-entered data is not formatted but is stored
exactly as it was entered.

As a result of automatic formatting, the date in the ORDER and TOTALS
forms is always in the format mm/dd/yy (both dates are type MDY). The
calculated display-only values are right justified with leading zeros
stripped.  A decimal point is inserted the correct number of positions
from the right (in NUM2 fields, two positions from the right).

Action 

For a full discussion of this topic, read "Automatic Formatting" in
Section 4 of the VPLUS/V Reference Manual.

          Table 5-2.  FORMSPEC Automatic Formatting 

--------------------------------------------------------------------------------------------
|                           |                                                              |
|           Data            |                          Formatting                          |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| CHAR                      | None                                                         |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| NUMn                      | Right justify value; strip leading zeros and replace with    |
|                           | blanks; strip any plus sign; move any minus sign to position |
|                           | preceding first non-blank digit; strip any commas; insert    |
|                           | decimal point as needed and fill fractional part with zeros. |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| NUM                       | Same as NUMn except that an attempt is made to fit 9 decimal |
|                           | places, rounding or truncating and inserting a decimal point |
|                           | as needed.                                                   |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| NUM0                      | Same as NUMn except that no decimal point is inserted and    |
|                           | any fractional part is rounded.                              |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| IMPn                      | Same as NUMn except that any decimal point is moved.         |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| DIG                       | Right justify value; strip leading zeros and replace with    |
|                           | blanks.  (Any sign, commas, or decimal point are illegal in  |
|                           | a DIG field.)                                                |
|                           |                                                              |
--------------------------------------------------------------------------------------------
|                           |                                                              |
| DMY, YMD, MDY             | Any date is formatted as dd/dd/dd where the order of the     |
|                           | day, month, year is determined by the data type.             |
|                           |                                                              |
--------------------------------------------------------------------------------------------

[]
Figure 5-17. Field Menu for SHIP in the TOTALS Form


MPE/iX 5.0 Documentation