FORMAT(4)

Table of Contents

Name

nl
outputs a newline character
tab
outputs a tab character
sp
outputs a space character
col
spaces to a specified column
%:
removes white space characters
%%
outputs a percent character

Synopsis

%nl
%tab
%sp
%col(C-expression)
%:
%%

Description

The format constructs are used in template and proc sections to format or layout a product. This generally means to embed white space characters in a product in such a way that it appears exactly the way the SDTool designer wants it to.

By default, all white space in template and proc sections that precedes verbatim text or expression constructs is treated as verbatim text and is output to the product. All other white space is not generated to the product.

This default rule handles most formatting needs in a natural way. However, the format constructs described here can be used when this default proves inadequate. Most of the format constructs are self-explanatory. The sp, tab and nl constructs output a space, tab and newline character, respectively, to the product.

The col construct directs subsequent output to start at the column number indicated by the expression. If the current column exceeds this value, then a newline is output, and then tabs and spaces are output to reach the column.

The : construct removes the surrounding white space that would otherwise be output to the product. This construct does not remove the white space put in by the other format constructs. This construct is generally used to remove the white space that is used in the template and proc sections to better format the product description file. For example, consider the problem of producing a list of items with no newlines between them. The following does not work: %template
%forall a:ID %loop
%(tok(a)),
%end-loop

because the white space before %(tok(a)) is not removed, so a newline and tab are output before each item. This can be solved by placing a : construct somewhere between the loop and expression construct:

%template
%forall a:ID %loop %:
%(tok(a)),
%end-loop

See Also

AGPUTS(5)


© 1990 Lucent Technologies, Inc
© 1998 Harmony Software, Inc