Sign in Join
Wiki copytemporary

Page: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Page

OldNewLine
1+The [[Standard Pascal|standard]] [[Procedure|procedure]] **`page`** advances the output of a given textfile by one page. *Page* could refer to a piece of paper if the destination is a physical printer, or could imply blanking the entire screen, the specific behavior is implementation-defined.
2+
3+## signature
4+
5+`Page` takes *one* [[Text|text file]] as a parameter. It determines the destination. If the destination is [[Output|output]], it can be omitted. `page;` is short for `page(output);`.
6+
7+## behavior
8+
9+Provided the destination is open for writing:
10+
11+1. If not at the *beginning* of a line, do a [[writeln|writeLn(destination)]].
12+2. Implementation-defined method of advancing to the next “page”.
13+
14+## implementation
15+
16+- On IBM mainframes, advancing to the next page was achieved by putting a `1`, that is the character of the digit 1, in the first column of a line.
17+- On most machines using [[ASCII]] though, it simply means emitting a form feed character, i. e. [[Chr|chr(12)]]. The [[FPC]] and the [[GNU Pascal]] Compiler use this method.
18+
19+## notes
20+
21+- In the FPC `page` is only available in [[Mode iso|{$mode ISO}]] and [[Mode extendedpascal|{$mode extendedPascal}]].
22+- `Page` is a regular [[Identifier|identifier]] and as such can be redefined.
23+
24+---
25+*From the Free Pascal wiki, page "Page", as it stood on 2022-01-24 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
26+Category: File Handling
27+Category: Pascal

Back to history