<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'> > >> I know this can be done using m3makefiles and the build system, but I <br> > >> am hoping someone can point to a place where it already exists. I need <br><BR> <BR>We already do expose this, TARGET_ENDIAN, via m3makefile as you allude.<br>See here:<BR><a href="http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/float/m3makefile?rev=1.38;content-type=text%2Fplain">http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/float/m3makefile?rev=1.38;content-type=text%2Fplain</a><BR> <BR><br>Also a good place to expose this would be here:<br> <a href="http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/runtime/common/m3makefile?rev=1.34;content-type=text%2Fplain">http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/runtime/common/m3makefile?rev=1.34;content-type=text%2Fplain</a> <br> => <a href="http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/runtime/common/Compiler.tmpl">http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/runtime/common/Compiler.tmpl</a> <br> => Compiler.ThisEndian or such. <BR><br> <BR> Why do you need it? <br> Very little code cares about this sort of thing, and you can usually figure it out easily enough portably at runtime.<BR> <BR><br> - Jay<BR><br><br><br><br> <BR><div>> Date: Sun, 26 May 2013 21:02:21 -0500<br>> From: rodney_bates@lcwb.coop<br>> To: m3devel@elegosoft.com<br>> Subject: Re: [M3devel] Getting IsLittleEndian as a Modula-3 CONST<br>> <br>> Yes. And so says Modula-3, 2.6.15, Constant Expressions.<br>> ADR isn't legal in constant expressions either.<br>> <br>> On 05/26/2013 02:54 PM, Dragiša Durić wrote:<br>> > My first idea (very fast&dirty) was<br>> ><br>> > CONST<br>> > BigEndian = LOOPHOLE(1, ARRAY[0..7] OF BITS 8 FOR [0..255])[0] = 0;<br>> ><br>> > But this is not constant expression, so says cm3 :).<br>> ><br>> > --<br>> > Dragiša Durić<br>> > dragisha@m3w.org <mailto:dragisha@m3w.org><br>> ><br>> ><br>> ><br>> > On May 26, 2013, at 8:47 PM, Rodney M. Bates wrote:<br>> ><br>> >> I know this can be done using m3makefiles and the build system, but I<br>> >> am hoping someone can point to a place where it already exists. I need<br>> >> a Module-3 CONST that tells endianness of the machine we are running<br>> >> on, that is available to code in m3core.<br>> ><br>> <br></div> </div></body>
</html>