Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!gitpyr!mlw From: mlw@pyr.gatech.EDU (Michael Williams) Newsgroups: comp.lang.pascal Subject: Re: Left Justifying Summary: Not easy Keywords: Turbo Pascal Message-ID: <9146@pyr.gatech.EDU> Date: 10 Sep 89 18:06:48 GMT References: <537@disk.UUCP> Reply-To: mlw@pyr.UUCP (Michael Williams) Organization: Georgia Institute of Technology Lines: 21 In article <537@disk.UUCP> specter@disk.UUCP (Byron 'Maxwell' Guernsey) writes: >Suppose I wanted it to justify into the left field.. like so... >WRITELN('This text.':12,'foo'); >This text. foo >Is there a way other than a user procedure to do this? > It's not pretty, but one way to do this using turbo pascal is to use the built in string functions: st := 'This text.'; writeln(st,' ':12-length(st),'foo'); Doing this adds enough extra blanks to bring the total length to 12. What happens when the string to be written is too long for the field width is your problem; at least it doesn't crash. -- Michael Williams Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{akgua,allegra,amd,hplabs,ihnp4,seismo,ut-ngp}!gatech!gitpyr!mlw ARPA: mlw@pyr.gatech.edu