Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!eos!aurora!labrea!decwrl!hplabs!hpda!hpcupt1!hpcuhb!hpcllla!hpclisp!hpcljws!jws From: jws@hpcljws.HP.COM (John Stafford) Newsgroups: comp.lang.pascal Subject: Re: universal writeln in Turbo Pascal? Message-ID: <950007@hpcljws.HP.COM> Date: 18 Mar 88 01:05:03 GMT References: <3297@okstate.UUCP> Organization: HP ITG/ISD Computer Language Lab Lines: 28 I don't know turbo, but if it support passing files as parameters (standard Pascal does), just put the writeln in a procedure that takes the file to use as a parameter. PROGRAM something (input, output); VAR f1: TEXT; f2: TEXT; PROCEDURE writeit (VAR f: TEXT); BEGIN writeln (f, 'Hello World'); END; BEGIN (* Do whatever one does to associate Pascal file variables with external files here. This is no doubt wrong for Turbo, it is how HP Pascal would do it... i.e. something like rewrite (f1, 'SCREEN:'); rewrite (f2, 'PRINTER:'); *) writeit (f1); writeit (f2); END.