> One thing to be slightly aware of with
> dynamic pointers and alignment. For V: atray
> of Integer etc, make sure you check the
> alignment of V[0], not V. V points to an
> internal structure that is largely opaque,
> while V[0] points to the actual data, which I
> imagine is what you want to pass into VMOVAPS
> etc.
> 
> Gareth aka. Kit

I believe your are wrong here.
For dynamic arrays, service data is located at negative offset and pointer 
itself _is_ zero element address.

type
   TIntArray = array of Integer;

var v:TIntArray;
begin
   SetLength(v,100);
   Writeln(NativeInt(Pointer(v)) = NativeInt(Pointer(@v[0]))); // always gives 
true
end.


-- Regards,
Denis Golovan
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to