In fact, to state it again - more clearly this
time. I'm sorry for the earlier muddle.
I want to be able to do something like the
following:
Var
FileName, FileOne, FileTwo : TextFile;
FileName, FileOne, FileTwo : TextFile;
File : String;
begin
if cond1 then
begin
FileName := FileOne;
File := 'FileOne.txt';
end
else
begin
FileName := FileTwo;
File := 'FileTwo.txt';
end;
begin
if cond1 then
begin
FileName := FileOne;
File := 'FileOne.txt';
end
else
begin
FileName := FileTwo;
File := 'FileTwo.txt';
end;
AssignFile(FileName,
File);
Rewrite(FileName);
Write(FileName, 'Data',
'MoreData');
end;
But I can't go
FileName := FileOne;
end;
But I can't go
FileName := FileOne;
I get this error message "Operator not applicable
to this operand type"
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
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