Handling files in GPC (with Linux)_(re)
Tue, 7 Oct 1997 00:46:49 +0200 (MEST)
According to Christian Bockermann:
>
> I've a little problem. I want to open an ASCII-file in one of my programs
> and then edit it. Of course, I did this with TP under MS-DOS, but I don't
> have any plan how this works in Linux ?!
Almost like with TP. `Append' becomes `Extend', and with anything
older than gpc-971001 you need the `Assign' procedure from the
BPcompat package. But then it should be the same:
Var
Z: String ( 1024 );
Assign ( MyFile, 'foo.bar' );
reset ( MyFile );
while not eof ( MyFile ) do
readln ( MyFile, Z );
close ( MyFile );
> Does anyone know what to do ? I just downloaded the bpcompat-packet but
> the files don't compile under Linux. (I'm trying to get some of the units into
> a Linux-version)
That's a good thing! :-)
The problems you are having when compiling these Units under Linux
come from the missing DPMI stuff and other DOS specifica. Under Linux,
you have to use library functions and/or system calls instead.
Good luck,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
maintainer GNU Pascal [971001] - http://home.pages.de/~gnu-pascal/ [970125]
Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es