FOOTING Statement

The FOOTING statement specifies the text to be printed at the bottom of each page of output.

Format

FOOTING expr

Parameter(s)

expr

An expression evaluating to the text to be printed as the footing. These special option characters below can be included in expr, enclosed in quotes. Multiple options may be specified within a single set of quotes.

P

Current page number.

L

Carriage return and line feed.

T

Current time and date.

D

Current date.

C

Center the line.

Description

Multiple FOOTING statements may be used to change the footing within a single program, with each FOOTING statement taking effect on the current page of output. Pagination begins with page 1 and increments automatically on generation of each new page.

Before a FOOTING statement can take effect, a HEADING statement is necessary to initialize the page parameters in a program. See HEADING Statement for more information.

Output is suspended after each footing until a carriage return is input. This feature can be disabled by the N option to the HEADING statement.

The HEADING, FOOTING, and PAGE statements affect the same output device that the PRINT statement does. The PRINTER statement toggles the output device between the terminal screen and the printer. If multiple print files are used, the HEADING, FOOTING, and PAGE statements only affect print file 0 (the default).

Example

In this application the FOOTING statement sets up a footing on each page with "Status Report" in the left corner and the page number on the right. The SPACE function is used to generate the correct number of spaces in the footing.

FOOTING "Status Report" : SPACE(57) : "Page 'PC' "

See Also

Statement and Function Reference