General HydroStatics
Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)

PAGE 99%

The PAGE command is used to control page numbers and page breaks in GHS reports. You may recall that the topic of page prefixes was discussed in COW090 allowing sections to be easily added in GHS reports.

If you use the single word PAGE command, GHS will add a page break to your report. Since GHS is very often used in a run file that evaluates lots of cases, many times you want to add a page break, but only if the report writer isn't already positioned at the top of a blank page. In that situation, the PAGE 99% command is ideal since it skips to the next page if less than the given percentage of the printable area of the current page is empty. The default number of lines per page is less than 100, so PAGE 99% will insert a page break if even a single line has been written to the current page.

The perfect place for PAGE 99% is the start of a calculation macro, or right before a command sequence that you've designed to occupy a full page. Here is an example of such a sequence from COW194:
  STATUS WEight:total DIsplacement
  DISPLAY (*) STATUS profile /page%:20
  RA /lim /notab /graph:fit,noarea

Some folks might say the PAGE 99% command is simply superior in all respects to PAGE, but clearly its Achilles heel is skipping multiple pages in a row.

If you have a specific report section, like a summary table, you can use PAGE LINES:n to skip to the next page if less than n lines are left on the current page. This does require that you know ahead of time how many lines the report section will be.

Next time you're formatting the pagination of a GHS report, remember this: 99% of the time, the command you want is PAGE 99%.

Questions, comments, or requests?
Contact Creative Systems, Inc.

support@ghsport.com

USA phone: 360-385-6212 Fax: 360-385-6213
Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday

Mailing address:
PO Box 1910
Port Townsend, WA 98368 USA

www.ghsport.com

Click here for an index to this and previous COWs