pred function gives for integer variables of type byte and word and value 0 wrong resultats
Original Reporter info from Mantis: Delphi-Laie
-
Reporter name:
Original Reporter info from Mantis: Delphi-Laie
- Reporter name:
Description:
When integer values of types byte and word have got the value zero, then the pred function gives the wrong value 255 or 65535. With cardinal type is all ok, the result is -1. This appears both in FPC and in Delphi mode. This appears with := assignments but also without assignment (for instance in showmessages).
But with the simple subtraction (-1) all is ok.
In Delphi the pred function always give the correct result -1.
Mantis conversion info:
- Mantis ID: 20853