🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #422

Re: Multiple file open/close anomaly?

#422
From: Ing. Franz Glaser
Date: Fri, 04 Dec 1998 00:00
39 lines
1705 bytes
Robert AH Prins wrote:
> 
> Take this snippet:
> 
> const
>   sfile: integer = -1;
> 
> procedure open(_file: integer);
> begin
> {$ifdef fast}
>   if _file <> sfile then
>     begin;
>       sfile:= _file;
> {$endif}
>       close(datatout);
>       assign(datatout, files[_file]);
>       settextbuf(datatout, databuf^, 8192);

Are you SURE that this SetTextBuf is done also in your
first rewrite (which is not shown here obviously)?
Cannot find any other reason for your experience :-)
If not, how often do you skip the code here...

> 
>       if __first_event then
>         begin
>           rewrite(datatout);
>           __first_event:= false;
>         end
>       else
>         append(datatout);
> {$ifdef fast}
>     end;
> {$endif}
> end; {open}
> 
-----> snip

Franz Glaser
Technical Details
Message-ID: <36685A89.70BC2B0F@eunet.at>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <749jnl$slc$1@nnrp1.dejanews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111659,df5b94058f04a442
X-Google-Attributes: gid111659,public
X-Google-Thread: 108ebd,df5b94058f04a442
X-Google-Attributes: gid108ebd,public
From: "Ing. Franz Glaser" <meg-glaser@eunet.at>
Subject: Re: Multiple file open/close anomaly?
Date: 1998/12/04
Message-ID: <36685A89.70BC2B0F@eunet.at>
X-Deja-AN: 418751217
Content-Transfer-Encoding: 7bit
References: <749jnl$slc$1@nnrp1.dejanews.com>
To: Robert AH Prins <prinsra@williscorroon.com>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@Austria.EU.net
X-Trace: fleetstreet.Austria.EU.net 912808562 19836 193.81.169.133 (4 Dec 1998 21:56:02 GMT)
Organization: http://members.eunet.at/meg-glaser/index.html
Mime-Version: 1.0
NNTP-Posting-Date: 4 Dec 1998 21:56:02 GMT
Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal