delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/04/20:26:32

Date: Thu, 4 Dec 1997 17:24:58 -0800 (PST)
Message-Id: <199712050124.RAA26244@adit.ap.net>
Mime-Version: 1.0
To: Peter Palotas <blizzar AT hem1 DOT passagen DOT se>,
"A. Sinan Unur" <sinan DOT unur AT cornell DOT edu>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Simple beginner questions
Cc: djgpp AT delorie DOT com

At 07:37  12/4/1997 -0500, Peter Palotas wrote:
>>make a habit of setting fp to NULL after closing it. AFAIK, files do not
>>close themselves.
>
>I actually think that the libc exit code does this for you, although it is
>probably not defined in the ANSI standard that the files should be closed,
>but DJGPP does this, I think.
DJGPP quite definitely does it. I expect that it is part of the ANSI
standard, since automatically closing files is guaranteed as far back as K&R
I. Of course, it is best to close a file when you finish with it.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019