Printing a number of spaces

spc()

Print a number of spaces


SYNTAX

spc(integer)

Print the specified number of spaces. If the function is preceded by a comma separator, the number of spaces specified in sys.Gap are also printed; if it is also followed by a comma separator, the number of spaces specified in sys.Gap are printed twice, in addition to the number specified in the spc function.

The integer may be any expression which evaluates to an integer value.

If a proportional font is being used, the spaces are internally converted to a tab position, all tab positions being based on the width of the “0” character. The actual amount of space printed depends on the width of the preceding text. The value of integer may be 0 - this can save space if it is known that the actual width of the preceding print field will definitely be less than its allocated print width - e.g. if it contains a decimal point. (Because the “.” character is narrower than a digit, a field containing it always uses less space than its allocated width.)

This function is meaningless outside a print[h] command.


EXAMPLES

print TempFile.Name; spc(16); TempFile.Tel
print sys.Date; spc(sys.Gap * 3); sys.Time

RELATED TOPICS

Reports

Report functions

asp()

nsp()

Using proportional fonts