micha at neli.hopto.org
Wed Oct 26 10:11:04 CEST 2005
Adriaan van Os wrote:
>> I have never could understand when this is allowed
>> Why this is not allowed
>> If A1=A2 then
>> in most Pascal compilers.
> Because you can't simply compare the memory ranges occupied by records A
> and B. They could have different pad bytes (and bits) but still be the
Isn't the number of pad bytes a property of a type ? So when two vars
are of the same type, they also have the same number of pad bytes ?
Or: the compiler could also do the equivalent of sizeof(a1)=sizeof(a2),
if equal then can compare "easy" (same number of pad bytes), otherwise
give appropriate error (size of type differs, or so).
More information about the fpc-pascal