<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Sorry something wasn't clear.<br>If you just allow assignability, sprinkling ORD is sufficient, and must be done a lot, as presented in one of my diffs;<br>Annoying, voluminous, but should suffice.<br>I'll do it again if you need.<br><br><br>With mixed operations and assignability, the only change outside libm3 is<br> changing the signatures of Length and Seek<br> and the FOR change, though that's just because I didn't really finish<br>   the mixed operation change.<br><br><br>I just meant that assignability fix in the compiler doesn't suffice<br>  to actually enable mixed operations.<br><br><br>I believe Rodney said something like "mixed operations follow from assignability";<br>and from a language point of view, that may be true, just not from the point of view;<br><br><br>You know, if I can assign a LONGINT to an INTEGER, and then add it to an INTEGER;<br>what is the difference vs. just allowing direct addition?<br><br><br>VAR i1,i2:INTEGER;<br>       j1: LONGINT;<br><br><br>i1 := j1;<br>INC(i2, i1);<br><br><br>vs.<br>INC(i2, j1);<br><br><br>If the first is allowed, shouldn't the second?<br><br><br> - Jay<br><br><br><hr id="stopSpelling">From: hosking@cs.purdue.edu<br>Date: Sat, 9 Jan 2010 15:54:22 -0500<br>To: jay.krell@cornell.edu<br>CC: m3devel@elegosoft.com<br>Subject: Re: [M3devel] another longint variant<br><br>

<base><div><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="ecxApple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div><span class="ecxApple-style-span" style="font-size: medium;">On 9 Jan 2010, at 15:17, Jay K wrote:</span></div></span></span></span></span></span></span></span></span></div></span></span></div><div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;">[replacing periods with semicolons to avoid truncation..]<br> <br> <br>Right..I was going to say..as an overall change, like if we<br>want mixed operations, it really doesn't suffice;<br>Many of my m3front changes were in direct response<br>to compilation errors and fixed them;<br></div></span></blockquote><div><br></div><div>I'd like precise examples.</div><br><blockquote><span class="ecxApple-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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;"> I'm sure as well that just allowing assignability doesn't make the rd/wr<br>change particuarly small/smooth. You need mixed operations,<br>indexing, new, or else sprinkle ORD around;<br></div></span></blockquote><div><br></div><div>I'm not sure I see why sprinkling ORD is insufficient...  again, precise examples.</div><br><blockquote><span class="ecxApple-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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;"> There's a particular characteristic I should point out in the rd/wr code;<br>Maybe rd/wr should be modified..but it probably can't;<br>In particular, my understanding of rd/wr is that the maintain two<br>"numbers" (integer or longint, depending on how everything is resolved);<br>These numbers indicate the file offset that is at the start of the buffer<br>and at the end of the buffer. In a new world they need to be LONGINT;<br>However their "span", their difference, describes an<br>in-memory buffer size. Therefore their difference is always INTEGER<br>or CARDINAL, not LONGINT. It'd be super cool, but probably not<br>possible, if the language let you declare this somehow.<br>THEN mixed operations and such wouldn't be needed,<br>if the compiler new that subtracting these two integers<br>yielded an INTEGER, and possibly inserted checks of that;<br>But this is probably just a lazy user view and not realistic<br>for the language.<br></div></span></blockquote><div><br></div><div>That would be tricky...</div><br><blockquote><span class="ecxApple-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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;"> For assignability I think your change does work but mine was less wordy<br>and maybe more general;<br></div></span></blockquote><div><br></div><div>No, yours breaks assignabilty from subrange to INTEGER/LONGINT.</div><br><blockquote><span class="ecxApple-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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;">The preexisting code allowed I believe any non-LONGINT ordinal<br>type to be assigned to any non-LONGINT ordinal type if there<br>are any overlapping values. Specifically really,<br>non-ordinal types with same base type and anyoverlap.<br>I removed the base type check;<br></div></span></blockquote><div><br></div><div>That's what broke it.</div><br><blockquote><span class="ecxApple-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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;">This makes enums <=> longint, integer subranges <=> longint, etc;<br></div></span></blockquote><div><br></div><div>Can I convince you to work things up with my trivial change?</div><div><br></div><div>I really want to see the impact of not allowing mixed arithmetic while having assignability.</div><div><br></div><blockquote><span class="ecxApple-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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;"><div><blockquote><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; word-spacing: 0px;"><div class="ecxecxhmmessage" style="font-family: Verdana; font-size: 10pt;"><br> - Jay<br><br> <br><hr id="ecxecxstopSpelling">Subject: Re: [M3devel] another longint variant<br>From:<span class="ecxecxApple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>Date: Sat, 9 Jan 2010 13:30:55 -0500<br>CC:<span class="ecxecxApple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>To:<span class="ecxecxApple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br><br><div>Jay, what are the implications of just having assignability rather than mixed arithmetic?  Can you work through that change?   My preference right now is to allow assignability (range-checked, of course) but not mixed arithmetic.  The simple little patch I sent you for Type.IsAssignable on ordinals should allow you to test things. As far as I can tell, that will simply work...</div><div><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><div style="word-wrap: break-word;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px;"><div><span class="ecxecxecxApple-style-span" style="font-size: medium;"><font class="ecxecxecxApple-style-span" color="#0000ff" face="'Gill Sans'"><br></font></span></div></span></span></span></span></span></span></span></span></div></span></span></div><div><div>On 9 Jan 2010, at 05:22, Jay K wrote:</div><br class="ecxecxecxApple-interchange-newline"><blockquote><span class="ecxecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; white-space: normal; letter-spacing: normal; word-spacing: 0px;"><div class="ecxecxecxhmmessage" style="font-family: Verdana; font-size: 10pt;">[attached]<br>In this variant, the compiler has been made<br> "maximally lenient" and the rd/wr changes are minimized.<br> <br><br>Specifically:<br>  compiler allows assignment either way and various math<br>  operations, including NEW array and array subscript.<br>  mixing in FOR loops is missing (FOR i := INTEGER TO LONGINT or LONGINT TO INTEGER)<br> <br><br>  rd/wr changes outside libm3 are only changing<br>   the signatures of Seek and Length<br>   pretty minimal, and hard to imagine they could be smaller,<br>    though actually they could..well..the need to fix existing<br>    rd/wr could be eliminated/delayed<br>    rd/wr could introduce SeekL, LengthL which by default<br>    call Seek/Length, and then rd/wr could gradually convert,<br>    and not gain 4GB capability until then<br> <br><br>  no VAL or ORD needed<br><br> <br>  some rd/wr implementations might be artificially limited<br>  to 4G simply because they don't chane some INTEGER to LONGINT;<br>  "anything compiles"<br> <br><br>  some of the compiler changes are probably slightly off or incomplete<br>   including a need to insert the checks for LONGINT => INTEGER<br><br><span><dif3.txt></span></div></span></blockquote></div><br></div></span><br class="ecxecxApple-interchange-newline"></blockquote></div><br></div></span><br class="ecxApple-interchange-newline"></blockquote></div><br>                                          </body>
</html>