beautypg.com

2 justifying margins – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 90

background image

Formatting Data in Report Generation

Chapter 9

9Ć2

F = fill character instructions
W = field width instructions
B = base system instructions

Figure 9.1 summarizes these format specifiers. The following four sections
discuss the J, F, W, and B specifiers.

Figure 9.1

Specifying a Data Format

Width of field. If not specified or 0, printing starts on

the left and continues through a field width necessary to

hold the value; therefore, justification and fill character

specifications do not apply.

Delimits the start

of format specification

Fill character

(With a field

width, default

is space

Justification:

+ for right

- for left

(With a field

width, default

is right)

Specify both or neither. Do not specify

when field width is not specified or 0.

Base:

B for binary

H for hexadecimal

O for octal

S for string

D for decimal

(If you enter a format delimiter,

you must specify the base. With

no delimiter, the default is decimal

for numeric values and string for

string values.)

The J and F characters in the format specification above allow you to
justify output margins. The J character can be:

+ for flush right margin justification
– for flush left margin justification

If you do not enter a margin justification character, the default format is
flush right.

The F character allows you to pad unused areas of a line, if the display
width is greater than the data length. Refer to the next section on
determining the display width. Any character can pad output data, but a +
or – sign must preceed the character. If you do not enter a justification

9.1.2
Justifying Margins