[comp.lang.pascal] File handles

silk@dhw68k.cts.com (Mitch Gorman) (03/16/90)

	I know this has been covered before; I remember seeing the subject come
up in either or both of this group and comp.sys.ibm.pc.  My apologies in advance
for the rehash.



	I was trying to write a program that would build me a hierarchy chart
out of a 680x0 assembly program it is my task to overhaul.  While I was still
working on it, I encountered a problem I have seen before, and forgotten how
to deal with.  The routine that did the bulk of the work was recursive, and 
when it found a branch or subroutine call that would take it out of the current
source module (there are approx. 50), it opened the new file and called itself
again to begin tracing the next routine.
	
	I was doing fine until I got to #17, I believe it was.  At that point,
TP gave me that lovely 'no more handles' message.  At the time, I simply
changed my code to not leave so many files open, by closing the current file
before the recursion, and reopening on return.

	I'm fairly certain, however, that there is a simple method for 
increasing the number of file handles available.  (Obviously, I already tried
changing my FILES = clause in config.sys!!)  

	I just can't remember what it is!!!  

	I'm not talking about anything involuted, like writing some code to
change PSPs and FCBs and ABCs and PDQs and what-have-you.  While I'm not
averse to doing that, I can sorta remember something easier that'll do the
trick.  Anyone know what I'm babbling about?

	Oh, if you're interested...  I gave up on the hierarchy-chart program,
not because of this handles bug, but simply because the code was written in
too wierd a fashion...  Never trust a hardware weenie to write decent code!!

_______________________________________________________________________________
	Mitch Gorman		Internet:  silk@dhw68k.cts.com
				uucp:  ...{spsd,zardoz,felix}!dhw68k!silk
-------------------------------------------------------------------------------
"Don't accept that what's happening is just a case of others suffering,
 	or you'll find that you're joining in the turning away." 
		- DG, PF, OTTA, AMLOR
_______________________________________________________________________________