First of all excusme for my little english.
I'm new and I haven't experience with GPC, in fact I don't like Pascal very much. But I need to do a work for the university. The version I run is: Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/specs gpc version 19990118, based on gcc-2.8.1
And I have some problems comparing strings.
If I compile and run the next program:
Program test;
var a,b:string(20); begin a:='Hello'; b:='Bye';
if(a<b) then writeln('Hello<Bye'); if(a>b) then writeln('Hello>Bye'); if(b<a) then writeln('Bye<Hello'); if(b>a) then writeln('Bye>Hello'); end.
The output generated is: Bye<Hello Bye>Hello
And, logically it isn't very nice :-)
My question is simple: why the program don't function as desired? Or, if the error is mine, What I do bad?
Postdate: I need to compile the program in the metionated version, and I can't update to a newer (university's administrators are not very servicial) Thus, if we can give a solution for the above version I'll be very happy. Otherwise I will be to codify strings with arrays of chars.
Please , if someone reply to this message can send a copy to jpujo012@correu.udg.es
Thanks And, another time excusme for me english.
LUJOP a écrit :
The output generated is: Bye<Hello Bye>Hello
Strange ! I find the correct result
Hello>Bye Bye<Hello
But I use the last alpha version of gpc. Is this a corrected bug ?
Maurice
On 19 Dec 99, at 21:06, Maurice Lombardi wrote:
LUJOP a écrit :
The output generated is: Bye<Hello Bye>Hello
Strange ! I find the correct result
Hello>Bye Bye<Hello
But I use the last alpha version of gpc. Is this a corrected bug ?
IIRC, the answer is "Yes".
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 v5.21 for Win32 http://ourworld.compuserve.com/homepages/African_Chief/chief521.zip