Path: utzoo!attcan!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.JUNET (Norman Diamond) Newsgroups: comp.lang.pascal Subject: Re: Variable length output with Write(ln) inTurbo Pascal 5.0 Summary: y Message-ID: <10003@socslgw.csl.sony.JUNET> Date: 15 Jan 89 04:59:44 GMT References: <1779@pur-phy> Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 20 In article <1779@pur-phy>, murphy@pur-phy (William J. Murphy) writes: > Does anyone know of a way using Write or Writeln to output a variable > length set of variables on a *single* line? Use Write *and* Writeln, to do exactly what they say they do. > In C you could write > for(i =0; i printf("%d ",max[i]); > printf("\n"); In Pascal you could write FOR i := 0 TO n-1 DO WRITE (max[i], ' '); WRITELN; -- Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.jp@relay.cs.net) The above opinions are my own. | Why are programmers criticized for If they're also your opinions, | re-inventing the wheel, when car you're infringing my copyright. | manufacturers are praised for it?