QTIPS - Suppressing Initial Form Feed
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 JAN 1992 | 2.11+ | EXPERT | FORM, FEED, HEADING, V6, SET-OPTIONS, @SENTENCE |
When developing routines which use the HEADING statement and print to the printer, the omnipresent initial form feed can become a nuisance. As Dave Harmacek of Harmacek Database Solutions Inc points out, the verb responsible for RUN recognises and sets command line options. Thus RUN BP MY_PROG (PE) would actually suppress this initial form feed.
There are times when this might not be appropriate (such as in a subroutine that actually does the printing), thus a method to achieve the same functionality without the command line options is presented below. Note that it makes use of V6 - the SET-OPTIONS verb, and that SET- OPTIONS displays an informational message. This is probably not desirable in this case, so the message should be modified to make it an N type message by editing SYS.MESSAGES V6.1 and setting field 1 to N not A.
/* Author AMcA Date Jan 12th 1992 Purpose To prevent initial form feed when using heading with printer */ Printer On @Sentence = ". (PE" Call V6 heading "Hello There" for t = 1 to 120 print "Watch this" Next heading "" printer off * Now reset options to null or normal settings @Sentence = ". ()" Call V6
(Volume 3, Issue 8, Page 8)