<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
[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>
 <BR>
 <BR>
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>
 <BR>
 <BR>
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>
 <BR>
 <BR>
For assignability I think your change does work but mine was less wordy<BR>
and maybe more general;<BR>
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>
This makes enums <=> longint, integer subranges <=> longint, etc;<BR>
 <BR>
 <BR>
 <BR>
 - Jay<BR><BR> <BR>
<HR id=stopSpelling>
From: hosking@cs.purdue.edu<BR>Date: Sat, 9 Jan 2010 14:52:19 -0500<BR>To: jay.krell@cornell.edu<BR>CC: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] another longint variant<BR><BR><BASE>
<DIV><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV><SPAN style="FONT-SIZE: medium" class=ecxApple-style-span><FONT class=ecxApple-style-span color=#0000ff face="'Gill Sans'">It should suffice for assignability...</FONT></SPAN></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></SPAN></DIV><BR>
<DIV>
<DIV>On 9 Jan 2010, at 14:33, Jay K wrote:</DIV><BR class=ecxApple-interchange-newline>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxhmmessage>I don't believe that suffices but I can check again.<BR> <BR> - Jay<BR><BR> <BR>
<HR id=ecxstopSpelling>
Subject: Re: [M3devel] another longint variant<BR>From:<SPAN class=ecxApple-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=ecxApple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>To:<SPAN class=ecxApple-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 style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxecxApple-style-span>
<DIV><SPAN style="FONT-SIZE: medium" class=ecxecxApple-style-span><FONT class=ecxecxApple-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=ecxecxApple-interchange-newline>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; WORD-SPACING: 0px" class=ecxecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxecxhmmessage>[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=ecxApple-interchange-newline></BLOCKQUOTE></DIV><BR>                                     </body>
</html>