This error message is issued for type casts not allowed by the rules. The following kinds of casts are allowed:
There are other transfer functions like Ord and Chr that might make your intention clearer.
program Produce; begin Writeln( Integer(Pi) ); end.
This programmer thought he could cast a floating point constant to Integer, like in C.
program Solve; begin Writeln( Trunc(Pi) ); end.
In the Delphi language, we have separate Transfer functions to convert floating point values to integer.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|