[Info-vax] Notable VMS "feature"

Jess Goodman norebid at gmail.com
Tue Jan 26 07:31:32 EST 2016


On Sunday, January 24, 2016 at 3:40:18 PM UTC-5, gcorn... at charter.net wrote:
> gcornelius at charter.net wrote:
> >gcornelius at charter.net wrote:
> >> The rest is of course stolen from you.
> 
> Except the part where I forgot the parentheses
> about istat.and.1 in the if statement.
> 
> I believe the simplified form
> 
> 	if (istat.and.1)  ! no .eq.1
> 
> would work, though, so no need to have compared
> the results of the .and. to 1.
> 
> George

Actually in VMS Fortran (and in DCL) only the low-order bit of a logical value determines if it is TRUE or FALSE.  I remember this as "truth is odd".  And since for VMS status values "success is odd" you can code this way:

istat = LIB$SYS_FAOL('!254*X:',,u)
if (istat) istat=LIB$DELETE_LOGICAL(u,)
if (.not.istat) call LIB$SIGNAL(%VAL(istat))

Jess



More information about the Info-vax mailing list