Char-to-boolean cast works differently with Delphi
Original Reporter info from Mantis: Joost
-
Reporter name: Joost van der Sluis
Original Reporter info from Mantis: Joost
- Reporter name: Joost van der Sluis
Description:
The following program evaluates boolean(i) as false and thus doesn't write the string, while Delphi does. (tDbf uses this construct with calcaluated fields)
var i : char;
begin
boolean(i) := (1=1);
if boolean(i) then writeln('Delphi shows this string, fpc not');
end.
Mantis conversion info:
- Mantis ID: 11027
- Version: 2.3.1
- Fixed in version: 2.4.0
- Fixed in revision: 10521 (#62e66d2a)