[Info-vax] Notable VMS "feature"

George Cornelius cornelius at charter.NOWHERE.net
Tue Jan 26 22:42:46 EST 2016


On 01/26/2016 06:31 AM, Jess Goodman wrote:
> 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:

And I code that way in DCL. In Fortran, which is
a standards-based language, I have begun to think
that even if it is low bit only it is best to make
it explicit.

The compiler is smart enough to generate a BLBS
instruction whether the .and.1 is present or
not.

George

> 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