<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I don't know the precedence but agreed:<br><br><br>>           OR (IsEqual (Base(a), Int.T, NIL) AND IsEqual (Base(b), LInt.T, NIL))<br>>           OR (IsEqual (Base(a), LInt.T, NIL) AND IsEqual (Base(b), Int.T, NIL)))<br><br>I was being sort of lazy.<br>I've never touched the front end and it was critical I be able to make<br>a small change and see fairly precisely the expected change, even<br>if I didn't get all cases.<br><br>This is I'm sure why I had to add some VAL/ORD uses, to convert "UINT32"<br>in the Win32 code to INTEGER or LONGINT.<br><br>Also, I really think mixed arithmetic is ok.<br><br> - Jay<br><br><br>> From: hosking@cs.purdue.edu<br>> Date: Sat, 9 Jan 2010 00:37:42 -0500<br>> To: jay.krell@cornell.edu<br>> CC: m3devel@elegosoft.com<br>> Subject: Re: [M3devel] latest longint file size diffs<br>> <br>> Looking at your code, I think the assignability test for ordinals should be more like:<br>> <br>>       IF (IsEqual (Base(a), Base(b), NIL)<br>>           OR IsEqual (Base(a), Int.T, NIL) AND IsEqual (Base(b), LInt.T, NIL)<br>>           OR IsEqual (Base(a), LInt.T, NIL) AND IsEqual (Base(b), Int.T, NIL))<br>>          AND GetBounds (a, min_a, max_a)<br>>          AND GetBounds (b, min_b, max_b) THEN<br>>         (* check for a non-empty intersection *)<br>>         min := min_a;  IF TInt.LT (min, min_b) THEN min := min_b; END;<br>>         max := max_a;  IF TInt.LT (max_b, max) THEN max := max_b; END;<br>>         RETURN TInt.LE (min, max);<br>>       ELSE<br>>         RETURN FALSE;<br>>       END;<br>> <br>> That way CARDINAL and other subranges fall right out.<br>> <br>> Antony Hosking | Associate Professor | Computer Science | Purdue University<br>> 305 N. University Street | West Lafayette | IN 47907 | USA<br>> Office +1 765 494 6001 | Mobile +1 765 427 5484<br>> <br>> <br>> <br>> <br>> On 8 Jan 2010, at 06:13, Jay K wrote:<br>> <br>> > Attached is my latest work here.<br>> > With the compiler changes (in the diff), I was able to<br>> > elminate most uses of VAL(expr, LONGINT).<br>> > There's something slightly off such that I had<br>> > to add a very small number, like two.<br>> >  <br>> >  <br>> > The compiler change is newer than earlier.<br>> > For example you can now assign CARDINAL to LONGINT.<br>> > I didn't do it, but you should also be able to add/subtract/etc.<br>> > mixing CARDINAL and LONGINT.<br>> >  <br>> > <br>> > FOR statements also don't allow the level of mixing<br>> > that they should.<br>> > <br>> >  <br>> > I'm hoping to get agreement soon just from the diffs<br>> > but if necessary I'll look how to create a branch.<br>> > My general worry about branches is developers just<br>> > go off on their own in a branch and it's impossible to<br>> > get anyone to look at it, they are busy enough with one branch,<br>> > let alone multiple..<br>> >  <br>> > <br>> >  - Jay<br>> > <dif8.txt><br>> <br>                                         </body>
</html>