* Moved (from: gpc) by Berend de Boer using timEd 1.10.b3+.
Peter Gerwinski wrote in a message to Berend de Boer:
PG> I tried to use Extended Pascal "binding" to assign a file PG> variable to an external -- existing -- file. I just copied PG> the "Assign" pro- cedure by Berend as published in PG> borland2ep.doc. It does not always work: I often get a PG> runtime error saying that the file did not exist.
If you can repeat it, compile with another Extended Pascal compiler, for example Prospero's one. If that fails too, there is really something wrong with the code. But I suspect gpc. You're using which OS?
Groetjes,
Berend (-: fido: 2:281/527.23 email: berend@beard.nest.nl
Hello! I have solved the file problem.
It is in fact a bug in GPC 2.6.3: The bind procedure does not add a null character to the filename string when passing it to C. But no problem: we can correct it manually. (Since often there is a null character in RAM following the string by random, the error was not always reproducible.)
The following modified Assign procedure does work around the bug and has been proven to work with GPC:
Procedure Assign ( Var T: Text; protected Name: String );
Var B: BindingType;
begin (* Assign *) unbind ( T ); B:= binding ( T ); B.Name:= Name + chr ( 0 ); (* add the null character manually *) bind ( T, B ); B:= binding ( T ); end (* Assign *);
According to Berend de Boer:
Peter Gerwinski wrote in a message to Berend de Boer:
PG> I tried to use Extended Pascal "binding" to assign a file PG> variable to an external -- existing -- file. I just copied PG> the "Assign" pro- cedure by Berend as published in PG> borland2ep.doc. It does not always work: I often get a PG> runtime error saying that the file did not exist.
If you can repeat it, compile with another Extended Pascal compiler, for example Prospero's one. If that fails too, there is really something wrong with the code. But I suspect gpc. You're using which OS?
I am using Linux, OS/2 and (Novell) DOS.
I have never seen a compiler for Extended Pascal ... is Prospero's one FreeWare? Where can I find it?
Greetings,
Peter
-------------------------------------------------------------------------------- Dipl. Phys. Peter Gerwinski Fachbereich Physik Universitaet-GH Essen Phone: +49-201-183-2763 D-45117 Essen Fax: +49-201-183-2120 Germany e-mail: pege@mail.theo-phys.uni-essen.de --------------------------------------------------------------------------------
Hello, Peter Gerwinski! You wrote:
I have never seen a compiler for Extended Pascal ... is Prospero's one FreeWare? Where can I find it?
Prospero's compiler is commercial. There is one for OS/2 (which I reviewed in the May '95 edition of the Pascal Magazine) and there is one for DOS (which I have never seen). The OS/2 version is pretty good, and also supports ISO Pascal standards.
I think you can get Prospero by e-mail; tpm2info@prospero.demon.co.uk
Warmest regards, The Chief --------- Dr. Abimbola A. Olowofoyeku (The African Chief) Keele University, England (and, The Great Elephant) Email: laa12@keele.ac.uk or, chief@mep.com
levi@localhost.nc3a.nato.int wrote:
Hello! I have solved the file problem.
... snip ...
What happened - I suddenly received about 110 messages, dating back (like this one) to 1995. All from the same source. Operator error?