[fpc-pascal]How to assign a file? Please help
tobih at mayn.de
Wed Feb 14 09:41:55 CET 2001
if you use FILE as type,you have to set the record size to 1:
the default record size is 128 bytes...
----- Original Message -----
From: Martin Hankovec <Martin.Hankovec at oku-st.cz>
To: <fpc-pascal at lists.freepascal.org>
Sent: Wednesday, February 14, 2001 9:05 AM
Subject: [fpc-pascal]How to assign a file? Please help
> I've a problem:
> I'm writing simple routine for copying files (it's in documentation too).
> If the type of variable for statement 'assign' is TEXT - it's OK. 'Reset'
> opens it, 'close' closes it even for many files.
> B U T
> If it's 'FILE' like in example in doc, and I try to copy more files, it
> on error - too much files are opened. And I use only Assign,Reset and
> So after 'close' on filetype 'FILE' it is still opened ?!!!
> Fin,fout : text;
> Assign (Fin,name);
> close (fin);
> This works on many files OK. If I change it to
> Fin,fout: file;
> after 5 proofs it will crash (5 is the maximum of simultaniously opened
> under my Win NT)
> I have the ver. 1.0.2 of compiler.
> Can anybody tell me, how to copy many of files?
> Thanks a lot and have a good day
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal