On 30/10/2013 13:49, Xiangrong Fang wrote:
2013/10/30 Martin <laza...@mfriebe.de <mailto:laza...@mfriebe.de>>
I think there is no problem with:
var
a: array of Integer
begin
A:= obj.proc;
You are NOT using the type. You are using the value.
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.
Yes. But what I mean is, your code does not refer to the type directly.
Since the type is part of value, and the value is public, all of the
type that is accessed through the value is available.
Same as you can access a private field through a public property.
However the type itself (as referenced by the identifier in the type
declaration), that is the type without a value, is not used by your code.
You do not declare a new variable of that type.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal