Board index » delphi » Problem with TextFile

Problem with TextFile

I am attempting to make the move from Turbo Pascal to Delphi 2 and
finding it difficult going.

I get compilation errors with the following

var
   MyTextFile : TextFile

Is there a particular unit that I have to have in the uses clause to
acces the type TextFile?

This is probably dreadfully simple but thanks to anyone who can help.

 

Re:Problem with TextFile


Alan,
   The only unit you need for declaring a file of type TextFile is System.
If you have that unit included and are still having trouble, you may want
to take a look at the way in which you are trying to open the file.
                                                        Dave

Alan Humphries <a...@gvgs.vic.edu.au> wrote in article
<34e8f857.3154...@news.mcmedia.com.au>...

Quote
> I am attempting to make the move from Turbo Pascal to Delphi 2 and
> finding it difficult going.

> I get compilation errors with the following

> var
>    MyTextFile : TextFile

> Is there a particular unit that I have to have in the uses clause to
> acces the type TextFile?

> This is probably dreadfully simple but thanks to anyone who can help.

Re:Problem with TextFile


Dave Parsons schrieb:

Quote
> Alan,
>    The only unit you need for declaring a file of type TextFile is System.
> If you have that unit included and are still having trouble, you may want
> to take a look at the way in which you are trying to open the file.
>                                                         Dave

Why not:  MyTextFile : Text;   ???
Is TextFile special to Delphi?
Regards
Franz Glaser, Austria
http://members.eunet.at/meg-glaser

Other Threads