[M3devel] Getting IsLittleEndian as a Modula-3 CONST
Rodney M. Bates
rodney_bates at lcwb.coop
Mon May 27 04:02:21 CEST 2013
Yes. And so says Modula-3, 2.6.15, Constant Expressions.
ADR isn't legal in constant expressions either.
On 05/26/2013 02:54 PM, Dragiša Durić wrote:
> My first idea (very fast&dirty) was
>
> CONST
> BigEndian = LOOPHOLE(1, ARRAY[0..7] OF BITS 8 FOR [0..255])[0] = 0;
>
> But this is not constant expression, so says cm3 :).
>
> --
> Dragiša Durić
> dragisha at m3w.org <mailto:dragisha at m3w.org>
>
>
>
> On May 26, 2013, at 8:47 PM, Rodney M. Bates wrote:
>
>> I know this can be done using m3makefiles and the build system, but I
>> am hoping someone can point to a place where it already exists. I need
>> a Module-3 CONST that tells endianness of the machine we are running
>> on, that is available to code in m3core.
>
More information about the M3devel
mailing list