Portability questions (Arrays)_(re)

Sat, 3 May 1997 18:28:47 -0400



Frank Heckenbach wrote:

>Two questions about portability of properties of arrays:

>1. Is it safe to assume -- for all platforms, including possible future
>   ones -- that SizeOf(a) =3D ((Ord(y)-Ord(x)+1) * SizeOf(t)?

No.

> 2. Is it safe to assume that
>   Integer(@a[p])-Integer(@a[q]) =3D (p-q) * SizeOf(t)?

No.

>   (Is it generally allowed to cast a pointer into an integer,
>   in the first place?)

No.


Groetjes,

Berend.


Berend de Boer (berend@compuserve.com)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es