Article View: comp.lang.pascal.borland
Article #416Re: Multiple file open/close anomaly?
From: Robert AH Prins
Date: Sun, 06 Dec 1998 00:00
Date: Sun, 06 Dec 1998 00:00
41 lines
2000 bytes
2000 bytes
In article <36699C17.8EE47C9C@eunet.at>, "Ing. Franz Glaser" <meg-glaser@eunet.at> wrote: > Robert AH Prins wrote: > > > > Yes, it is! > .... > This was a doubtful idea only. Let me make a more professional > suggestion: > > Open/create as many files as you need, and send the appropriate > file to your procedures as a Var parameter or even berrer as a > pointer to the file. This makes it unnecessary to open and > close them so frequently. > > Var ProtFiles : Array[1..xxx] of Text; > PT : ^Text; > > Procedure AnyProc; > Begin > Writeln(PT^,...); > End; > > PT^ := @ProtFiles[3]; > AnyProc; > > In case the file handles exhausted, look for the article in the > TP-links site, FAQ-page, about >15 handles. Thanks Franz, As useful as this may be, it is unuseful in his particular case, as I don't have enough heap left over to allocate buffers for both files at the same time, unless I give them only 4K. Robert -- Robert AH Prins prinsra@williscorroon.com -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<74djqr$2af$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<749jnl$slc$1@nnrp1.dejanews.com> <36685A89.70BC2B0F@eunet.at> <74bee2$bal$1@nnrp1.dejanews.com> <36699C17.8EE47C9C@eunet.at>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: Robert AH Prins <prinsra@williscorroon.com> Subject: Re: Multiple file open/close anomaly? Date: 1998/12/06 Message-ID: <74djqr$2af$1@nnrp1.dejanews.com> X-Deja-AN: 419190230 References: <749jnl$slc$1@nnrp1.dejanews.com> <36685A89.70BC2B0F@eunet.at> <74bee2$bal$1@nnrp1.dejanews.com> <36699C17.8EE47C9C@eunet.at> X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 193.130.234.1 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Dec 06 09:47:07 1998 GMT Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal X-Http-User-Agent: Mozilla/3.0 (Win16; I)