Purpose of "FILES = 20" in CONFIG.SYS

edited August 2016 in Software
I installed Turbo Pascal 7.0 on my MS-DOS 6.22 virtual machine, and at the end of installation this dialog box appears.

3e687727970e5ba2603c7ac71ba672fb.png

I don't understand the purpose of adding "FILES = 20" to the CONFIG.SYS file, and I can do my programming exercises just fine without including the line. Trying to look online led me to a Turbo Pascal help page about "Out of memory" errors and another was a TP 3.02 Readme, however it did not help me understand much.
» Modify CONFIG.SYS to remove unnecessary
drivers; also reduce files and buffers
(SET FILES = 20, SET BUFFERS = 20).
3. The use of file handles now necessitates closing all files, even
if they were not modified. You should also place a "FILES = 20"
statement in your CONFIG.SYS file. Note that DOS always uses five
file handles (standard input, output, error, auxiliary, standard
printer). Please refer to your DOS technical reference manual for
more information about DOS file handles.
What effects does including (or omitting) this line have on DOS?

Comments

  • According to this page, the files variable in CONFIG.SYS is how many files DOS can have open at one time, and that the default value is 8.

    Program projects can require many code files. I'm not particularly familiar with either Pascal or that particular compiler/IDE however, so I can't say for certain if it's so that more than eight (or three, given what the second article says) files can be open at once, but I'm going to assume that's what it's for. I'm not sure if Turbo Pascal 7.0 can have multiple files open at the same time.

    So you are right in that your programming exercises aren't affected by this. It also won't affect DOS as far as I know, but it may affect how many files you can have open if you plan on doing more complex programs with this program. It may also affect compilation if you need more than eight files for a program.
This discussion has been closed.