delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/25/20:37:02

Date: 26-DEC-1994 02:27:10 +0100
From: TAUPIN AT rsovax DOT lps DOT u-psud DOT fr
Subj: Pascal chr() and Fortran ICHAR() converted to C
To: djgpp AT sun DOT soe DOT clarkson DOT edu

Subject: Pascal chr() and Fortran ICHAR() converted to C

With bith p2c and f2c (recent versions) I find serieux problems in
alphebetic sorting. O cours this does not happen with std ASCII chars, i.e.
less than 128, but for accented letters >= 128.

Both f2c and p2c convert things like a:=ord('z') simpling by affecting
the character 'a' to an integer. Unfortunately, if the character is above
127, then a sign extension occurs, giving a negative ord() or ICHAR().

Is this a djgpp problem (unlikely) or a simultaneous bug both in f2c and p2c.
If the seond holds, corrections shold be posted and therefore welcome.

D. Taupin

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019