Micha Nelissen ha scritto:
Giuliano Colla wrote:
var
Pfoo: pointer;
foo: "any valid FPC Type" based Pfoo;
or
foo: based Pfoo "any valid FPC type";
.....
Pfoo: pointer;
PBfoo: PByte absolute Pfoo;
PIfoo: PInteger absolute Pfoo;
I don't see the difference between "based" and absolute, except order of
keywords?
With "based" you declare a variable name, which you access directly,
without need of an extra type declaration. Pfoo is the pointer, foo is
the variable, no ambiguity.
With "absolute" you need a) to declare an extra type (PByte, or
whatever), b) to explicitly access the variable through the pointer
(PBfoo^ as opposed to foo). But if the variable is an array or a string,
then you have ambiguities wether Pfoo means the variable or the pointer.
Order of keywords of course is not relevant, I just picked up the first
one coming to my mind.
--
Giuliano Colla
Whenever people agree with me, I always feel I must be wrong (O. Wilde)
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel