<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
> > it'd be nice imho for    the language or m3core to also build-in UINTEGER, INT8, INT16,<br>> > INT32, INT64, UINT8, UINT16, UINT32, UINT64, just so folks wouldn't   <br>> > have to provide them themselves. (CARDINAL I don't think is what I   <br>> > want.)<br>> > Add them somewhere in m3core?<br>> > MODULE Integers; ?<br>> <br>> Such things may be convenient for programmers, but are left out of the<br>> language because the specification must not become too long, I think.<br>> I'd opt for library extensions in this case.<br><br>Good enough.<br>Except I'm not sure about UINTEGER..like..why is CARDINAL only half range?<br>I'd have to dig in..NOT now..<br><br>> Yes, IIRC there are no checks on integer overflow; this is an<br>> implementation flaw. How would you provide this? Add generation of<br>> checks on every integer operation?<br><br>Well, it's a no-win situation.<br>The check would bloat the code.<br>Even function calls would bloat and slow.<br>Probably function calls.<br><br>And then hopefully optimize them some.<br>For example:<br>FOR i := 0 TO n DO<br>   ...<br>END;<br><br>Check up front then n isn't negative, and then no checking is needed for the incrementing of n to overflow.<br><br>Similarly,<br>FOR i := 0 TO n BY 2 DO<br>
   ...<br>
END;<br><br>or whatever is the syntax, check if the start/end are divisible by the increment and the start is less than the end, and then no overflow check needed.<br>
<br>I guess on most architectures every add/sub/mul/div instruction would tend to have one additional instruction, a conditional branch, after it.<br>It will take some investigation.<br>Perhaps gnat (GNU Ada compiler, part of gcc) or gpc (Pascal, I think likewise, maybe) already provide this though.<br>Maybe just some simple reuse.<br><br>There'd probably be pragmas or other types to choise behavior, esp. in unsafe modules.<br><br>Anyway, none of this particular soon, at least by me, I have a bunch of other things I want to do or see done first.<br>But sure we can talk about it or someone else can do it. :)<br><br> - Jay<br><br></body>
</html>