Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!psuvax1!rutgers!att!watmath!maytag!watstat!dmurdoch From: dmurdoch@watstat.waterloo.edu (Duncan Murdoch) Newsgroups: comp.sys.ibm.pc Subject: Re: Various Turbo pascal questions Keywords: Turbo pascal Message-ID: <900@maytag.waterloo.edu> Date: 24 Nov 89 14:09:50 GMT References: <2185@leah.Albany.Edu> <6972@portia.Stanford.EDU> Sender: daemon@maytag.waterloo.edu Reply-To: dmurdoch@watstat.waterloo.edu (Duncan Murdoch) Organization: U. of Waterloo, Ontario Lines: 26 In article <6972@portia.Stanford.EDU> gaia@portia.Stanford.EDU (fai to leung) writes: >In article <2185@leah.Albany.Edu> ppd491@leah.Albany.Edu (Peter P. Donohue) writes: >> >> I have a few questions pertaining to programming in Turbo Pascal 5.5 >>under the MS-Dos operating system. Any help with these would be >>appreciated. >> >> 1) In an external data file (containing all ascii data), what is the >>maximum length of a line allowed? > >I would say 255 characters long. >Pascal strings format are byte[0]=length of string follow by the ascii chars. In TP 5.5, there doesn't appear to be a line length limit of 255 characters. Certainly a single string can only be that length, but a statement like readln(string1,string2); will successfully read lines up to 510 characters long, in two parts, and for i:=1 to 100 read(x[i]); will successfully read 100 numbers off a line even if the line is much longer than 255 characters. Duncan Murdoch