close(file); always necessary??
leledumbo_cool at yahoo.co.id
Tue Jun 15 13:06:21 CEST 2010
Why rely on implementation? One good coding practice is to close what you've
opened. AFAIK in most Pascal implementation, even if the OS will close the
file upon program exit, the buffer that contains something you write will
not be flushed. So you will lose everything you've written.
> In non-standard Pascal mode, does it matter if I explicitly close
> the file or not? E.g., "close(file);", is that done automatically or
> is it implementation defined? (I'm 99% sure DOS always closes files
> upon exit.) I'm just wondering if that's a fair assumption for Linux,
> etc. (though I kinda doubt it).
View this message in context: http://old.nabble.com/close%28file%29--always-necessary---tp28887188p28889944.html
Sent from the Gpc mailing list archive at Nabble.com.
More information about the Gpc