[Re: [lazarus] RFC : Type separation]]]]]

Peter Vreman pfvreman at wins.uva.nl
Mon Aug 9 13:55:34 EDT 1999


At 19:08 9-8-99 , you wrote:
>I think I'll do this, after all.
>The only reason why I am reluctant to it, is the question whether it is a
>viable solution in terms of multiplatformness, e.g. does the compiler resolve
>the following issues?
>
>1. Enumerated types are (propably) 1 byte size, Integer 4 byte (even 8 bytes
>on 64-platforms)

Depends on the $PACKENUM switch, default is 4 bytes. 8 bytes is not allowed 
atm, it's still in development, even constants > $7fffffff are not allowed.

>2. Byte endianity - is this typecasting still legal for different byte
>ordering when compiling for multiple platforms ?

The same rules as for ordinals, you can always convert to ordinal.

>3. Range overflows checking - when this style of programming spreads too much,
>it could end up in rather a mess. Or is the range check performed during the
>cast, say Integer(TEnumeratedType) ?

Then no rangecheck is done, only for TEnumeratedType(Integer)







More information about the Lazarus mailing list