Pre-Setting BOX Position Arguments
Procedure
You can use the POSITION and SIZE commands to preset some arguments in the BOX command. POSITION presets the starting point (upper left corner) of a box or line. SIZE specifies the width and height of a box.
You can use POSITION and SIZE to preset arguments, but you can also set the start point and size arguments of a box or line directly in the BOX command.
By default, if no positioning is specified, the upper left corner of a box or halftone or the top of a line is aligned with the current SAPscript window. That is, the upper left corner of the box, halftone, or line starts at the upper left corner of the current window in the active form. By default, the height and width of a box are set to the height and width of the current window.
Use POSITION and SIZE to preset the arguments in a BOX command in the following situations:
-
The BOX command is not allowed to exceed the 132-character (1 line in SAPscript) length limitation. If you specify all arguments directly in the command, this length limitation could be exceeded. This can be the case, for example, if you use symbols in the command.
By pre-setting arguments with POSITION and SIZE, you can work around the limitation on the length of a command. You do not need to specify the preset arguments again in the BOX command.
-
You want to use the enhanced capabilities of POSITION for adjusting the starting point of a box or line.
With BOX, you can specify an offset for the starting point only as a whole number (non-negative integer). This command would print a box starting 1 CM to the right and 1 CM down from the left upper corner of a window:
/: BOX XPOS '1' CM YPOS '1' CM
With POSITION, you can specify the position of a line or box in relation to the window with greater precision, since both positive and negative whole numbers and fractions are possible with this command.
-
You want to use the SIZE functions for entering relative sizes in order to control the size of a box, a half-tone area, or a line.
With BOX, you can make only absolute size specifications. Example: BOX HEIGHT overrides the default height setting and activates the height of the current window.
With SIZE, you can adjust the size of a box or a line with respect to its previously-set dimensions.