[fpc-pascal]several questions

DONALD PEDDER jims_son at jedi.apana.org.au
Thu Sep 11 14:18:17 CEST 2003

   The answer to my "runtime error 6" (invalid filename) ended up being I
had too many files open (apparently). I couldn't find anything invalid
about the filename (it was a standard DOS 5.3, with no LFN), but in
looking for every instance of "runtime error" I could find, I found the
"close(filename)" command. I decided that would be good practice, and it
fixed the problem once I closed a file I was finished with.

   Can you only have 2 files open with FP? As above, I fixed my problem
with opening the third file by closing another, and only having 2 open at
once. My config.sys has "FILES=20", so it's not a DOS limitation by the
look of it (unless my FP program is opening up another 18 related system
files behind the scenes. e.g. units or something).

   I also wanted to know if there's a colour palette somewhere? Or a list
of the text-names that can be used with "textcolor"?

   When I run pascal programs (not just FP, but other compilers too), the
last text-colour I used stays even after the program is finished. The
original default colour only returns after I call something else. e.g.
DR-DOS editor.
   Also, if I call the program from a batch-file, I still have the default
colour when it's finished, so a direct call to the program changes my
default text until such time as I call something else.

   Not a FP-specific question, but while on the topic - I would actually
like to permanently change my default text-colour, but can't find where I
can do that (I looked around the BIOS, and couldn't see anything, and the
"colour scheme" in DR-DOS only applies to the editor and stuff, not your

   All suggestions welcome on any of these issues.


E-mail               - donaldp at au.mensa.org
BIG DON's Home-page  - http://jedi.apana.org.au/~jims_son
Pedder Passer Rating - http://jedi.apana.org.au/~jims_son/PPR
AusNFL mailing-list  - http://jedi.apana.org.au/mailman/listinfo/ausnfl

"What I always wanted is to be accepted, not understood" - MAN RAY

More information about the fpc-pascal mailing list