----- Original Message -----
Sent: Wednesday, March 07, 2001 7:54 PM
Subject: RE: [DUG]: Referencing variable TextFile names

Hello Mark,
 
>AssignFile(FileName, File);
>ReWrite(FileName);
>Write(FileName, 'Data');
 
I believe you meant something like:
 
var
    F : TextFile;
    FileName : String;
begin
 
AssignFile(F, FileName);
ReWrite(F);
Write(F, 'Data');
 
The answer, as far as I know, is you can't assign different files to the same variable and use them dynamically.
 
To solve a "one variable - many text files" problem I use threads.
 
Yes.  Thank you that is much clearer and more succinct and is exactly what I meant.
If you cannot assign file names and use them as I have suggested, I'll just have to do it the inefficient way, using seperate procedures.  The size of my app certainly doesn't warrant my coming to grips with threads.
 
Thanks for your help
Mark

Reply via email to