Was this helpful?
.Left Statement--Left Justify the Text
The .left statement left justifies the next text to be printed.
This statement has the following format:
.left | .lft [[+|-] n | columnname | expression]
The parameters for the .left statement are as follows:
+ | -
Optional sign that moves the output position n positions relative to the last position output. If sign is not present, the position is the absolute position in the output line.
n
Position to which the next text is left justified. The default value is the left margin of the report (set by the .leftmargin statement).
columnname
Name of a column in the report. You can specify the column name as a delimited identifier by enclosing it in double quotes ("), if you previously specified the .delimid statement.
The position for the column is determined either explicitly through the use of the .position statement, or implicitly as described in Automatic Determination of Default Settings. If columnname is specified, Report-Writer left justifies the next output text and places it at the position associated with the named column.
expression
Numeric or string expression. If the expression is numeric, it must evaluate to the next print position on the line. If the expression is a string, it must evaluate to the name of a column in the report. Precede all variables that are part of the expression with a dollar sign ($).
The plus sign (+) and minus sign (-) must be explicitly stated and cannot be part of the expression.
Description
The .left statement left justifies the text printed in the next .print statement to one of the following locations:
Specified position
Position corresponding to a specified column
Value of a numeric expression that evaluates to a specified position
Value of a string expression or variable that evaluates to a column name
Report-Writer evaluates any expressions that are used as parameters to the .left statement during runtime.
You can specify all the values for these parameters as either absolute or relative to the last output position. Report-Writer removes all leading and trailing blanks from the text before placing the text in the output line.
The .left statement is the same as the .tab statement for all output except for text that contains leading blanks, such as formatted numbers.
The meaning of the .left statement is slightly changed when executed in column formatting mode (that is, when the .within statement is in effect and default column widths and positions are assumed). When executed under these circumstances, the .left statement positions text at the left margin of the column indicated in the .within statement. For more information about column formatting mode, see the .within/.endwithin statements.
Example
Output the title as centered and the value of balance as left justified to position 40.
.position balance (40, 10)
      . . .
.center balance
.print 'Balance'
      . . .
.detail
    .left balance
    .print balance (f10.2)
Last modified date: 01/30/2023