On 30 Oct 2013, at 14:49, Xiangrong Fang wrote:
pascal is strong-typed. You are actually using type along with its
value.
e.g.
var
a: array of Double;
begin
a := obj.proc;
This will emit a COMPILE time error because compiler know these 2
types are
not compatible.
No, it does not cause an error. Pascal indeed does not use structural
compatibility for record/object/class types (two record/object/class
types with exactly the same fields are not assignment-compatible), but
for other types such as integer/float types (because of implicit
conversion) and arrays you have more "cross-type" compatibility.
Jonas_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal