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

Arne Vajhøj arne at vajhoej.dk
Fri Feb 11 11:38:20 EST 2022


On 2/11/2022 10:36 AM, HCorte wrote:
> A sexta-feira, 11 de fevereiro de 2022 à(s) 15:20:35 UTC, Arne Vajhøj
> escreveu:
>> 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?
>> A single call? No.
> 
> This subroutine is called in quite some programs/executables but
> since its alls to prompt the user for some kind of input, expect that
> any point in time would only be running one of this executables at a
> time, but could call this subroutine some times never the less each
> exe.

Measure!

       program gsoh
       integer*8 N
       parameter (N=10000000)
       character*256 s
       integer*4 slen, i
       integer*8 t1,t2
       call lib$get_symbol('X', s, slen)
       write(*,*) s(1:slen)
       call sys$gettim(t1)
       do 100 i = 1,n
         call lib$get_symbol('X', s, slen)
100   continue
       call sys$gettim(t2)
       write(*,*) N * 10000000 / (t2 - t1), ' calls per second'
       end

Arne





More information about the Info-vax mailing list