home *** CD-ROM | disk | FTP | other *** search
- {File: PROUT.INC
- created: 06/26/85
- adapted: from CHOUT.PAS, off Borland SIG Feb. 3, 1985
- revised: 07/01/85}
-
- (*{$U+} *) {* NOTE: delete this $U+ when use as an include file}
-
- type
- prmode_typ = (pr_init,pr_on,pr_off);
- var
- conoutptr_orig,
- lstoutptr_orig : integer;
- toprint : boolean; {indicates whether output to printer or not}
-
- procedure prout(prmode:prmode_typ);
- begin
- { writeln(Ord(prmode));}
- case Ord(prmode) of
- 0: begin {initialize}
- conoutptr_orig := conoutptr;
- lstoutptr_orig := lstoutptr;
-
- end;
- 1: conoutptr := lstoutptr; {send display --> printer}
- 2: conoutptr := conoutptr_orig; {reroute display --> display}
- else
- writeln(' ERROR! Incorrect parameter to procedure PROut');
- end; {case}
- end; {prout}
-
- {remove the next line to enable testing of this module}
- (*
- begin
- write('START: ConPtr=',Conoutptr,'/ LstPtr=',Lstoutptr,'/ HIT ENTER'); readln;
- prout(pr_init);
- writeln('ORIGINAL POINTERS: Con= ',conoutptr_orig:6,' / Lst= ',Lstoutptr_orig);
- write('INITd: ConPtr=',Conoutptr,'/ LstPtr=',Lstoutptr,'/ HIT ENTER'); readln;
- prout(pr_on);
- write('Printer SET ON: ConPtr=',Conoutptr,'/ LstPtr=',Lstoutptr,'/ HIT ENTER'); readln;
- prout(pr_off);
- write('SET OFF: ConPtr=',Conoutptr,'/ LstPtr=',Lstoutptr,'/ HIT ENTER'); readln;
- writeln('I am back on the display, right?');
- end.
- (**)