[fpc-pascal]file

Jonas Maebe jonas at zeus.rug.ac.be
Mon Jul 22 01:03:44 CEST 2002


On Sun, 21 Jul 2002, Olaf Leidinger wrote:

> Let's say I've a variable of type file. Is there a way to find out if
> it is assigned and the file is opened?

Not really. It's sort-of possible by copying the internal structure from
the RTL and checking certain fields, but even that method isn't fool-proof
(since it's possible that an uninitialized file variale "accidentally"
contains valid values). You really should structure your program so that
at any time, it knows in what state a certain file (or any other variable)
is.


Jonas





More information about the fpc-pascal mailing list