<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
TYPE ExitCode = [0 .. 16_7FFFFFFF];<br><br><br>(* An exit code (or status) of zero normally means successful<br> termination, and a non-zero value normally indicates an error, but<br> the exact conventions vary between systems and programs. *)<br><br>Is there a good reason this isn't a full INTEGER?<br>Or at least a full Cstdint.int32_t?<br><br>In the Win32 case, we mask the actual exit code with this,<br>which will lead to the non-zero 0x80000000 becoming zero.<br><br>I'm inclined to change it like:<br><br>before:<br>RETURN Word.And(status, LAST(ExitCode))<br><br>after:<br>(* for some reason, cut off the high bit, but<br> * if that turns non-zero into zero, then still return non-zero *)<br>maskedStatus := Word.And(status, LAST(ExitCode));<br>IF status <> 0 and maskedStatus = 0 THEN<br> maskedStatus := 1;<br>END;<br>RETURN maskedStatus<br><br>Or change ExitCode to plain lossless INTEGER.<br>But maybe negative values were avoided for some reason?<br><br>I understand that on Posix, I think, you just get an 8 bit unsigned value.<br><br><br> - Jay<br> </body>
</html>