Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!bpa!cbmvax!vu-vlsi!lehi3b15!lafcol!galvinp From: galvinp@lafcol.UUCP (Pablo) Newsgroups: comp.lang.pascal Subject: Re: DUEL OUTPUT Summary: Passing strings. Keywords: Dual oiutput made easy Message-ID: <437@lafcol.UUCP> Date: 2 Mar 89 04:57:56 GMT References: <18461@adm.BRL.MIL> <2937@udccvax1.acs.udel.EDU> Organization: Academic Computer Center, Lafayette College Lines: 24 In article <2937@udccvax1.acs.udel.EDU>, mikej@pyr1.acs.udel.EDU (Michael Jacobs) writes: > In article <18461@adm.BRL.MIL> pmancini@lynx.northeastern.edu writes: > > to the screen and to a LST device or file. I hate having to > > write lines twice, such as; > > > > writeln('abcdefg12345'); {goes to screen} > > writeln(lst,'abcdefg12345'); {goes to printer} > > > How about making a procedure with a string as an input and does the > two writeln's in it. > I was once wrote a function that was passed a string of allowed input characters as well as a character that had been input. The function was not flagged with any errors or anything, but my professor stated that this was a bad idea, passing strings to functions/procedures. Was he right? I lost several points for the project and I was never given a very satisfactory answer concerning why it was a bad idea. (The program ran under Turbo Pascal). Paul J. Galvin (galvinp@lafcol).