[comp.lang.pascal] TP6.0 too many open files error

boerner@ut-emx.uucp (Brendan B. Boerner) (04/17/91)

Hello, I finally installed Turbo Pascal 6.0 this weekend and tried
rebuilding a project I've been working on that is based on the Turbo
Pascal Editor toolbox (4.0)

The problem I'm running into is that if I delete all my .TPUs and
build, it stops, opens up a window, and gives me an "Error 13 - To
many open files (MSDIRECT.INC)" message.  (MSDIRECT.INC is an include
file with the toolbox which sets various switches; it's included in
each file.)  OK, I select make, it brings up another window (different
file), same error.  Select make again, another window (diff. file),
same error.  Select make again, another window (diff. file), same
error.  Select make again and the compiler finishes the job.  All in
all the compiler stops on four particular files which I've added to
the toolbox.  Each file is using 10-20 units in the uses statement.

I'm curious as to what is going wrong since I had no problems building
this using TP5.5 using a files=20 in my config.sys.  I've tried
files=20, files=40, files=60 and files=80 with no discernable
improvement between 60 and 80.

Any ideas?

Thanks,
Brendan
-- 
Brendan B. Boerner		Phone: 512/458-1770
Internet: boerner@emx.cc.utexas.edu     UUCP: ...!cs.utexas.edu!ut-emx!boerner

boerner@ut-emx.uucp (Brendan B. Boerner) (04/17/91)

In article <47276@ut-emx.uucp> boerner@ut-emx.uucp (Brendan B. Boerner) writes:
>The problem I'm running into is that if I delete all my .TPUs and
>build, it stops, opens up a window, and gives me an "Error 13 - To
>many open files (MSDIRECT.INC)" message.  (MSDIRECT.INC is an include
>file with the toolbox which sets various switches; it's included in
>each file.)  OK, I select make, it brings up another window (different
>file), same error.  Select make again, another window (diff. file),
>same error.  Select make again, another window (diff. file), same
>error.  Select make again and the compiler finishes the job.  All in
>all the compiler stops on four particular files which I've added to
>the toolbox.  Each file is using 10-20 units in the uses statement.

Hello, after posting this, I decided to use TPC to compile this
project (I should have tried this before posting, I know).  It
would give me the error "Error 9: Too many nested files."  Hmmmm.
Dig out the manual and on p271 in the Programmer's Guide, it sez
that you can nest include files up to 15 levels deep.  Hmmm, I only
have one include files included by all the units and about 6 or
seven others included at other places.  On p323 in the same manual
it sez you can nest no more than 15 source files.  

Anyway, I moved the declarations of the 4 files giving me problems
to the beginning of the uses statement in the main program, and
voila! no problems.  I won't speculate why TP5.5 compiled this
project previously, still, perhaps this'll help others with large
projects that could stand for some reorganization such as mine if
they run into similar problems.

Brendan