Puthd

Top  Previous  Next

Puthd places information in the heading block and is formatted as is the normal put command with the syntax

 

Puthd Item;

Example:

(putex5.gms)

Puthd "Page " system.page /;

Notes:

Once a Puthd command is executed the items therein are placed in the heading block.
The heading block is displayed on each subsequent page unless modified.
The heading block can be emptied out using Putclear.
Once the main window for a page has been is written to, any further modifications of the header block will be shown on subsequent pages and not the current page.
Every page must have an entry in the main window.  When a page has no output in its main window, the page is not written to file regardless of whether there are output items in the title or header blocks.  To force a page that has an empty window out to file, simply write something innocuous to the window such as: Put '';
The size of any area within a given page is based entirely on the number of lines put into it.
The total number of lines for all areas must fit within the specified page size.
If the total number of lines written to the title and header block equals or exceeds the page size, an overflow error will be displayed in the program listing.
Paging occurs automatically whenever a page is full.
Each area of a page is maintained independently, so we can write with a Puttl for a while then a Puthd, then back to a Puttl.  However once we use Put all subsequent Puttl and Puthd go to the next and subsequent pages, not the current page.