<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
I might be able to do this. Give me a day or so..<BR>
<BR>
- Jay<BR><BR> <BR>
<HR id=stopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu; m3devel@elegosoft.com<BR>Date: Sat, 13 Mar 2010 10:19:21 +0000<BR>Subject: [M3devel] comparisons vs. subranges<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
<*UNUSED*>PROCEDURE CardinalGE0(a:CARDINAL):BOOLEAN=BEGIN RETURN a>=0; END CardinalGE0;<BR><*UNUSED*>PROCEDURE CardinalEQN1(a:CARDINAL):BOOLEAN=BEGIN RETURN a=-1; END CardinalEQN1;<BR><BR> <BR>Seems to me, the front end should notice these.<BR>The first should always be TRUE.<BR> And possibly, possibly warn.<BR>The second should always be FALSE.<BR> And possibly, possibly warn.<BR> <BR>"Generic" programming often hits this sort of thing though, a good reason not to warn.<BR>Programmer might also be working with existing code and have changed INTEGER to CARDINAL.<BR> Or be defending against future maintainers changing CARDINAL to INTEGER.<BR> <BR> <BR>The backend isn't give enough information, because CARDINAL = INTEGER as far<BR>as it is told. Due to the half range of CARDINAL and LONGCARD, that isn't wrong.<BR>The only way to get unsigned types is to use ADDRESS from what I see.<BR> <BR> <BR> - Jay<BR><BR> </body>
</html>