Micha Nelissen wrote:
Ivo Steinmann wrote:

Well, it's a good idea to enable typed addresses by default, but I have got one problem with that. The pointer to an array of a type should be allowed to assign to the pointer of the same type.

Example

T: array[-10..10] of Integer;
P: PInteger;

I request that "P := @T;" should be allowed, because a pointer type in objfpc mode are also treated as pointer to an array of that type, that means P[...] is allways allowed also.


Just a note, there will be 3 ways to write the same thing then:

P := T;

This only compiles without errors if Low(T)=0.

P := @T;
P := @T[Low(T)];

A bit odd, no ? Although in all cases it's quite clear what is meant, but I don't know if this "scales" to more complex expressions ?

Vincent
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to