[Info-vax] Command Procedure pass value to program READ

Arne Vajhøj arne at vajhoej.dk
Fri Feb 11 10:32:08 EST 2022


On 2/11/2022 10:12 AM, HCorte wrote:
> Its working added a condition IF(LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE)) then uses unit=6.
> 
> for performance purposes LIB$GET_SYMBOL('script_origin',SYMBOL_VALUE) shouldn't have impact right?

So you are setting a symbol to indicate what to do.

Why not just test on what SYS$INPUT is?

Demo:

       program dvi
       include '($dvidef)'
       include '($dcdef)'
       integer*4 devclz
       call lib$getdvi(DVI$_DEVCLASS, %VAL(0), 'SYS$INPUT', devclz)
       if (devclz.eq.DC$_TERM) then
         write(*,*) 'You can write to unit 5'
       else
         write(*,*) 'Do not try to write to unit 5'
       end if
       end

Arne




More information about the Info-vax mailing list