Hi Chris The problem is your string variable declaration.
The following won't work, because all characters in the line will be read into the first string (unlimited length) var Text1, Text2, Text3 : String; begin readln(file,Text1,Text2,Text3); end; Try this var Text1,Text3 : string[10]; Text2 : string[15]; begin readln(file,Text1,Text2,Text3); end; Just make sure the string lengths correspond to the column spacings in your text file. Todd. ----- Original Message ----- From: "Chris Veale" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, July 23, 2003 1:27 PM Subject: [DUG]: readln? > Hi. > > I want to read in a line of strings into seperate variables and Im trying to > use > readln(file,var1,var2,var3); > > but the data for the line gets put into var1 and then the rest of the vars > are empty. > > I know you can do this I just cant seem to get it. > > Can anyone help please? > > Chris > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.502 / Virus Database: 300 - Release Date: 18/07/03 > > > > > ______________________________________________________ > The contents of this e-mail are privileged and/or confidential to the > named recipient and are not to be used by any other person and/or > organisation. If you have received this e-mail in error, please notify > the sender and delete all material pertaining to this e-mail. > ______________________________________________________ > -------------------------------------------------------------------------- - > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
