From: Self <Single-user mode> To: Frank Heckenbach heckenb@mi.uni-erlangen.de Subject: Readln bug and other stuff Reply-to: laa12@keele.ac.uk Date: Mon, 18 May 1998 10:48:37
From: Frank Heckenbach heckenb@mi.uni-erlangen.de Date: Sun, 17 May 1998 21:42:20 +0200 To: gpc@hut.fi Subject: Re: New GNU Pascal alpha gpc-980511
BTW: Frank and Peter - the "Readln" bug still exists under DJGPP.
This is my workaround; Readln ( MyText, s ); i := length ( s ); if s [ i ] = #13 then Delete ( s, i, 1);
I am not sure whether the fact that "s" contains the #13 character at the end of it is a GPC problem, or a DJGPP problem.
Strange -- I can't see this bug! I got the binary distribution of gpc-980511 (*) for DJGPP, and tested the following program.
(*) The files are dated 11 May -- though GPC gives 2.8.1 as its version number (under Linux as well). Is this correct, Peter?
program Chief23;
[....]
Your program works okay - and, you will be happy to hear, I have found the cause of the bug. It was caused by this statement in the initialization section of SYSTEM.PAS;
FMode := L_Binary;
I have now removed it.
Now, this takes me to another point. I need to remove the statement in SYSTEM.PAS that redefines "String" as "bpString" if "_Borland_Pascal_" is defined. This would of course change the definition of all those functions in the unit that either take "String" as parameters, or that return type "String". The question is, what should I change them to? Since this is a bpCompat unit, I could change all of them to "bpString" (or "ShortString", which is currently defined as "bpString"), or I could just leave them as "String", which might mean warnings, etc., and the compiler defaulting to a 255 character length. What do people think? A new version of bpCompat is imminent, and I need to resolve this issue.
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ Author of: Chief's Installer Pro 4.25 for Win16 and Win32: ftp://ftp.simtel.net/pub/simtelnet/win3/install/chief425.zip