I was trying both readln and read for this (as I thought the readln would
work a little differently), but the read also didnt work.

I have a comma delimited string that I want to expload from a text file into
an array.

Ill have a liook at the commatext property now, that sounds like what I want
to use.

Cheers

Chris

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Boyd, Conor
> Sent: Wednesday, 23 July 2003 1:37 p.m.
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: readln?
>
>
> Hi Chris,
>
> Surely if you've got one line of strings (i.e. there is only
> one CR or LF/CR
> pair) then the behaviour is as expected?
>
> If you only have one line of strings, how are they delimited?
>
> If they're comma separated, you could look at the CommaText
> property of a
> TStringList IIRC, which would then give you each of your
> separate strings as
> an entry in the stringlist.
>
> If you still want separate variables, then I think you're
> going to have to
> parse the line yourself, e.g. reading it character by character, and
> choosing when to break it yourself.
>
> Otherwise, I don't quite understand what you're trying to achieve.
>
> HTH,
>
> Conor
>
> -----Original Message-----
> From: Chris Veale [mailto:[EMAIL PROTECTED]
>
> 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?
> --------------------------------------------------------------
> -------------
>     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/
> ---
> Incoming 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
>

---
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/

Reply via email to