Article View: comp.os.msdos.programmer
Article #7908Re: open vs fopen?
From: Guus Leeuw jr.
Date: Wed, 07 Feb 1996 00:51
Date: Wed, 07 Feb 1996 00:51
35 lines
1634 bytes
1634 bytes
sherlock@micronet.fr wrote:
>natewild@mbnet.mb.ca (Nathan T. Wild) wrote:
>
>>In C, why would one use open and DOS int handles rather than fopen and
>>stdio file handles?
>
>>Is there some speed advantage or differnet functionality?
>
>>
>
>
>because files opened using open and DOS files handles can be read and
>write at the same time, while stdio files can't.
Hey, I didn't know that...
ANSI C says:
ANSI C requires that a file positioning function intervene between output and
input, unless an input operation encounters end-of-file.
So according to this, one can actualy read and write from one file with the
same
FILE*. You open the open like `fopen("Filename", "r+")'.
>
>suppose you have a database file, with fixed length fields.
>low level functions(open...) enable the writing of some records and
>the reading of other without closing the file.
As stated above, high level functions (stdio functions) to it too.
>
>
Regards,
Guus Leeuw jr
Technical Details
Message-ID:
<4f8t2t$7jo@news.rain.org>Path:
arc1-ca.pugleaf.net!news.rain.org!usenetReferences:
<uEYFxc9nX8WX083yn@mbnet.mb.ca> <4f8qbg$549@chleuasme.francenet.fr>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.rain.org!usenet From: "Guus Leeuw jr." <guusl@eiffel.com> Newsgroups: comp.os.msdos.programmer,comp.lang.c Subject: Re: open vs fopen? Date: 7 Feb 1996 00:51:41 GMT Organization: Interactive Software Engineering Inc. http://www.eiffel.com/ Message-ID: <4f8t2t$7jo@news.rain.org> References: <uEYFxc9nX8WX083yn@mbnet.mb.ca> <4f8qbg$549@chleuasme.francenet.fr> NNTP-Posting-Host: @outback.eiffel.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.12 (X11; I; Linux 1.2.8 i586) To: guusl@eiffel.com X-URL: news:4f8qbg$549@chleuasme.francenet.fr