Mark Wrote
> >So there are several procedures which reference a FileName
> >eg
> >AssignFile(FileName, File);
> >ReWrite(FileName);
> >Write(FileName, 'Data');
>
> >where FileName is of type TextFile and File is a string.
>
> I've either missed you question entirely or:
>
> If Cond1 then
> File := 'FileOne'
> else
> File := 'FileTwo';
> assignfile(Filename, file);
>
> Although the names of your variables are about faced.
>
> medge.
It's actually FileName that I want to be able to set (not File) - but in the
above procedures it is of type TextFile.
I would like toi be able to go
Var
FileName, FileOne, FileTwo : TextFile;
begin
if cond1 then
begin
FileName := FileOne;
File := 'FileOne';
end
else
begin
FileName := FileTwo;
File := 'FileTwo';
end;
AssignFile(FileName, File);
end;
But I can't go
FileName := FileOne;
That's the problem. I'm sure it's very basic - I've just never had to do it
before and can't think where else to look in the Help files.
Mark
>
---------------------------------------------------------------------------
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"