# page statement

The page statement terminates the current
page of output, prints the optional footing, positions to the top
of the form, and prints the optional heading.

## Syntax

```
page {num.exp}
```

## Parameter(s)

| num.exp | Optional expression used to change the current value of the page number. |
| --- | --- |

## Description

Note: The page statement works only when a heading or footing statement has been previously defined and is active.

## Example(s)

This example forces a new page
if the attribute to be printed starts with the string `.bp`.

```
heading "this is a heading"
lines = dcount(item,char(254))
for i = 1 to lines
l=item<i>
if l[1,3]=’.bp’ then page else print l
next i
```

## See also

- [crt statement](https://d3codex.com/pickbasic-flashbasic/crt-statement/)
- [footing statement](https://d3codex.com/pickbasic-flashbasic/footing-statement/)
- [heading statement](https://d3codex.com/pickbasic-flashbasic/heading-statement/)
- [Numeric expressions](https://d3codex.com/pickbasic-flashbasic/numeric-expressions/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [system() function](https://d3codex.com/pickbasic-flashbasic/system-function/)

---
Source: https://d3codex.com/pickbasic-flashbasic/page-statement/ - part of the D3Codex reference.
