Guardian Procedure Calls Reference Manual (G06.25+)

Formatter Edit Descriptors
Guardian Procedure Calls Reference Manual522629-013
F-11
The B Edit Descriptor
The B Edit Descriptor
The binary edit descriptor is used to display or interpret data values in binary (base 2)
integer form.
The B edit descriptor has the following forms:
B
w OR Bw.m
w an unsigned integer constant that defines the total field width and cannot
exceed 255. The field processed is the
w characters starting at the current
position. After the field is processed, the current position is advanced by
w
characters.
m an unsigned integer constant that defines the number of digits that must be
present on output.
The B edit descriptor is used in the same manner as the I edit descriptor where the
number base (
b) is 2, except that the B edit descriptor always treats the internal data
value as unsigned. (Refer to the description of the I edit descriptor, later in this
appendix.) For example, if the data item is an INT(16) in TAL, the following
conversions take place:
The “|” character is used to denote the boundaries of the output field.
The D Edit Descriptor
The exponential edit descriptor is used to display or interpret data in floating-point
form, usually used when data values have extremely large or extremely small
magnitude. The D edit descriptor is of the form:
D
w.d
This descriptor is identical to the E
w.d descriptor.
This edit descriptor is used in the same manner as the E edit descriptor (below).
Format Internal Value Result
B16 5 | 101|
B16.6 3 | 000011|
B16.6 -5 |1111111111111101|