HP Pascal/iX Reference Manual (31502-90022)

10- 23
Formatting of Output to Textfiles
When
f
is a textfile, the result type of
e
need not be char. It may be
any simple, string, or PAC type, or a string literal. The value of
e
may
be formatted as it is written to
f
using the integer field-width
parameters
m
and, for real or longreal values,
n
. If
m
and
n
are
omitted, the system uses default formatting values. Therefore, three
forms of
e
are possible:
e {default formatting}
e:m {when e is any type}
e:m:n {when e is real or longreal}
Table 10-3 shows the system default values for
m
.
Table 10-3. Default Field Widths
---------------------------------------------------------------------------
| | |
| Type of e | Default Field Width (m) |
| | |
---------------------------------------------------------------------------
| | |
| char | 1 |
| | |
---------------------------------------------------------------------------
| | |
| integer | 12 |
| | |
---------------------------------------------------------------------------
| | |
| real | 12 |
| | |
---------------------------------------------------------------------------
| | |
| longreal | 20 |
| | |
---------------------------------------------------------------------------
| | |
| bit16 | 12 |
| | |
---------------------------------------------------------------------------
| | |
| bit32 | 12 |
| | |
---------------------------------------------------------------------------
| | |
| bit52 | 12 |
| | |
---------------------------------------------------------------------------
| | |
| longint | 12 |
| | |
---------------------------------------------------------------------------
| | |
| shortint | 12 |
| | |
---------------------------------------------------------------------------
| | |
| boolean | 5 * |
| | |
---------------------------------------------------------------------------
| | |
| enumerated | length of identifier |
| | |
---------------------------------------------------------------------------
| | |
| string | current length of string |
| | |
---------------------------------------------------------------------------
| | |
| PAC | length of PAC |
| | |
---------------------------------------------------------------------------