[Info-vax] completion status from LIB$SPAWN

Howard S Shubs howard at shubs.net
Sat Apr 28 19:23:40 EDT 2012


In article 
<17891743.311.1335552942929.JavaMail.geo-discussion-forums at vbla14>,
 Hein RMS van den Heuvel <heinvandenheuvel at gmail.com> wrote:

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

It works by definition.  Success codes are defined as odd values, 
failure codes of whatever sort as even values.  We're talking about VMS.  
If you need compatibility with other systems, you're going to need to 
change these tests anyway.


> 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.

You're complaining about a stylistic difference of opinion.  Don't waste 
your time.

How this would be written in BASIC, I can't say.  The OP needs to read 
the documentation.  Specifically, the Calling Standard, which is at 
<http://h71000.www7.hp.com/doc/82final/5973/5973pro.html>, and more 
specifically 
<http://h71000.www7.hp.com/doc/82final/5973/5973pro_022.html#vmscond_valu
e_sec>, where this is thoroughly documented.  He/she can learn him some 
VMS programming!  Woot.

-- 
May joy be yours all the days of your life! - Phina
We are but a moment's sunlight, fading in the grass. - The Youngbloods
Those who eat natural foods die of natural causes. - Kperspective



More information about the Info-vax mailing list