66
SECTION 7. STANDARD EXTENSIONS
format codes for each type of data (i.e., character strings, logical, integer, or real) are
given in Table 7.8 and described below.
Character data If the table column contains a character string (with TFORMn =
'rA') then the TFORMn format code must be 'Aw' where w is the number of characters
to display. If the character datum has length less than or equal to w, it is represented
on output right-justified in a string of w characters. If the character datum has length
greater than w, the first w characters of the datum are represented on output in a string
of w characters. Character data are not surrounded by single or double quotation marks
unless those marks are themselves part of the data value.
Logical data If the table column contains logical data (with TFORMn = 'rL') then
the TFORMn format code must be 'Lw' where w is the width in characters of the display
field. Logical data are represented on output with the character T for true or F for false
right-justified in a space-filled string of w characters. A null value may be represented
by a string of w space characters.
Integer data If the table column contains integer data (with TFORMn = 'rX', 'rB',
'rI', 'rJ', or 'rK') then the TFORMn format code may have any of these forms: Iw.m,
Bw.m, Ow.m, orZw.m. The default value of m is one and the `.m' is optional. The first
letter of the code specifies the number base for the encoding with I for decimal (10),
B for binary (2), O for octal (8), and Z for hexadecimal (16). Hexadecimal format uses
the upper-case letters A through F to represent decimal values 10 through 15. The
output field consists of w characters containing zero or more leading spaces followed by
a minus sign if the internal datum is negative (only in the case of decimal encoding with
the I format code) followed by the magnitude of the internal datum in the form of an
unsigned integer constant in the specified number base with only as many leading zeros
as are needed to have at least m numeric digits. Note that m ≤ w is allowed if all values
are positive, but m < w is required if any values are negative. If the number of digits
required to represent the integer datum exceeds w, then the output field consists of a
string of w asterisk (*) characters.
Real data If the table column contains real data (with TFORMn = 'rE', or 'rD')
or contains integer data (with any of the TFORMn format codes listed in the previous
paragraph) which are recommended to be displayed as real values (i.e., especially in cases
where the integer values represent scaled physical values using Eq. 7.1), then the TFORMn
format code may have any of these forms: Fw.d, Ew.dEe, Dw.dEe, ENw.d, or ESw.d. In
all cases, the output is a string of w characters including the decimal point, any sign
characters, and any exponent including the exponent's indicators, signs, and values. If
the number of digits required to represent the real datum exceeds w, then the output
FITS Standard