[Info-vax] completion status from LIB$SPAWN

Hein RMS van den Heuvel heinvandenheuvel at gmail.com
Fri Apr 27 14:55:42 EDT 2012


On Friday, April 27, 2012 10:34:33 AM UTC-4, David Froble wrote:
> StGallen wrote:
:
> specifies success or failure.  Don't test the value, do a mask comparison, ie;
> 
> If (Stat% And SS$_NORMAL)
> Then Print "Success"
> Else Print "Failure"
> End If

I beg to differ. That's disgusting code. 
It may work, but does not does what it suggest.

SS$_NORMAL is NOT a bitmask, it is a word value.
That only works because you know its value is 1.
If so, then IMHO it is better just write that: stat & 1
Or use  STS$M_SUCCESS as mentioned earlier,
Or use a 16-bit-word-compare.

fwiw,
Hein






More information about the Info-vax mailing list