<html><head><base href="x-msg://859/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The RHS is a constant array *constructor*.<br>
<br><div><div>On 16 Apr 2010, at 21:50, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">There is this thing I read, where the types of values/constants are known without context.<br>The left hand side does not change the type of the right.<br>That confuses me here. It would imply the right is an open array.<br> <br> - Jay<br><br> <br><hr id="stopSpelling">Subject: Re: [M3devel] release engineering 5.8: code generator error for IP address initializers<br>From:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>Date: Fri, 16 Apr 2010 11:04:49 -0400<br>CC:<span class="Apple-converted-space"> </span><a href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</a>;<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br><br>You are confusing open array types with array constructors.<div><br></div><div><div><div><div>On 16 Apr 2010, at 08:15, Jay K wrote:</div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal medium/normal Helvetica; white-space: normal; letter-spacing: normal; word-spacing: 0px; "><div class="ecxhmmessage" style="font-family: Verdana; font-size: 10pt; ">(back to the topic :) )<br> <br>somewhat reduced case:<br>MODULE Main;<br>TYPE T1 = ARRAY [0..0] OF INTEGER;<br>CONST const: T1 = ARRAY OF INTEGER{2};<br></div></span></blockquote><div><br></div><div>This is an array constructor.</div><div><br></div><div>I suspect this is the same issue as in my previous e-mail. The following concise rewrite should work:</div><div><br></div><div>CONST const = T1{2};</div><br><blockquote><span class="ecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal medium/normal Helvetica; white-space: normal; letter-spacing: normal; word-spacing: 0px; "><div class="ecxhmmessage" style="font-family: Verdana; font-size: 10pt; ">BEGIN<br>END Main.<br><br>The problem is two global integers are overlapping.<br>The open array size and its first element.<br><br>new source -> compiling Main.m3<br>"..\Main.m3", line 5: warning: not used (const)<br>m3front:cg:Init_int:NOT in_init: o: 32 s:32 value:2 <==<br>m3front:cg:Init_int:NOT in_init: o: 32 s:32 value:1 <==<br>m3front:cg:Init_int:NOT in_init: o: 384 s:32 value:3<br>m3front:cg:Init_int:in_init: o: 32 s:32 value:1<br>m3front:cg:Init_int:in_init: o: 32 s:32 value:2<br> <br>Are these syntaxes legal?<br>This apparent mixing of open and fixed arrays?<br><br> - Jay<br><br> <br>> Date: Fri, 16 Apr 2010 12:50:48 +0200<br>> From:<span class="ecxApple-converted-space"> </span><a href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</a><br>> To:<span class="ecxApple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>> CC:<span class="ecxApple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Subject: RE: [M3devel] release engineering 5.8: code generator error for IP address initializers<br>><span class="ecxApple-converted-space"> </span><br>> I agree. Regular expressions in quake would be great for regression tests.<br>> Perhaps for the next release?<br>><span class="ecxApple-converted-space"> </span><br>> Olaf<br>><span class="ecxApple-converted-space"> </span><br>> Quoting Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>>:<br>><span class="ecxApple-converted-space"> </span><br>> > "aside":<br>> ><br>> ><span class="ecxApple-converted-space"> </span><a href="http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/p206__ARRAY_constructors_in_var_decls_using_named_open_array_types/">http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/p206__ARRAY_constructors_in_var_decls_using_named_open_array_types/</a><br>> ><br>> ><span class="ecxApple-converted-space"> </span><a href="http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/r004__negative_size_for_an_open_array/">http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/r004__negative_size_for_an_open_array/</a><br>> ><br>> ><br>> > It'd be nice if in Quake we had something regular expression-ish, so<br>> > that we could factor out the line numbers, such as e.g. to match<br>> > any decimal number.<br>> ><br>> ><br>> > Maybe just check for lines that start how we expect and cut them off<span class="ecxApple-converted-space"> </span><br>> > at some position.<br>> > That might be doable with today's Quake.<br>> ><br>> ><br>> ><br>> > - Jay<br>> ><br>> ><br>> ><br>> >> Date: Fri, 16 Apr 2010 11:45:09 +0200<br>> >> From:<span class="ecxApple-converted-space"> </span><a href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</a><br>> >> To:<span class="ecxApple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> >> Subject: [M3devel] release engineering 5.8: code generator error<span class="ecxApple-converted-space"> </span><br>> >> for IP address initializers<br>> >><br>> >> We also have this error, which should perhaps not be ignored?<br>> >><br>> >><span class="ecxApple-converted-space"> </span><a href="http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/p204__IP_address_initializers">http://hudson.modula3.com:8080/job/cm3-test-m3tests-AMD64_FREEBSD/lastBuild/testReport/(root)/m3tests/p204__IP_address_initializers</a><br>> >><br>> >> Olaf<br>> >> --<br>> >> Olaf Wagner -- elego Software Solutions GmbH<br>> >> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<br>> >> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95<br>> >><span class="ecxApple-converted-space"> </span><a href="http://www.elegosoft.com/">http://www.elegosoft.com</a><span class="ecxApple-converted-space"> </span>| Geschäftsführer: Olaf Wagner | Sitz: Berlin<br>> >> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<br>> >><br>> ><br>><span class="ecxApple-converted-space"> </span><br>><span class="ecxApple-converted-space"> </span><br>><span class="ecxApple-converted-space"> </span><br>> --<span class="ecxApple-converted-space"> </span><br>> Olaf Wagner -- elego Software Solutions GmbH<br>> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<br>> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95<br>><span class="ecxApple-converted-space"> </span><a href="http://www.elegosoft.com/">http://www.elegosoft.com</a><span class="ecxApple-converted-space"> </span>| Geschäftsführer: Olaf Wagner | Sitz: Berlin<br>> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<br>><span class="ecxApple-converted-space"> </span><br></div></span></blockquote></div><br></div></div></div></span><br class="Apple-interchange-newline"></blockquote></div><br></body></html>