🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: mod.computers.vax
Article #3798

SYS$SETIMR non-problem (AST routines and FORTRAN)

#3798
From: nagy%bsndbg.hepnet
Date: Tue, 17 Mar 1987 12:07
79 lines
2346 bytes
Alco Blom writes:

>I want to execute a routine every 3 seconds. I thought to
>do that with SYS$SETIMR. However I have problems with it.
>...     
>*--------
>subroutine astproc
>implicit none
>     
>include '($syssrvnam)'
>include 'sys$library:uisentry'
>include 'sys$library:uisusrdef'
>     
>integer status
>     
>logical done
>integer bindelay(2)
>common /uva/ done,bindelay
>     
>call uis$sound_bell('sys$workstation',4)
>     
>C now reset timer
>status = SYS$SETIMR(,bindelay,astproc,)
>if (.not. status) call lib$stop(%VAL(status))
>     
>return
>end
>     
>*--------
>The compiler gives the following messages
>     
>FORT-F-INVLEXEME, Variable name, constant or expression invalid in
>this context.
>[lay,astproc, )] in module astproc
     
The problem is with your second SYS$SETIMR call where you are passing
the parameter "astproc" from INSIDE the astproc routine!  This is a
no-no in FORTRAN as evidenced from the compiler error message.  The
thing to do is to embed the SYS$SETIMR call in a 3rd routine which
is called from astproc as in:

*-------
subroutine astproc
implicit none
     
include 'sys$library:uisentry'
include 'sys$library:uisusrdef'
     
call uis$sound_bell('sys$workstation',4)
     
C now reset timer
call astsetimr
     
return
end
     
*--------
subroutine astsetimr
implicit none
     
include '($syssrvnam)'
     
integer status
     
logical done
integer bindelay(2)
common /uva/ done,bindelay

external astproc
     
C now reset timer
status = SYS$SETIMR(,bindelay,astproc,)
if (.not. status) call lib$stop(%VAL(status))
     
return
end
     
*--------
This is FORTRAN problem, not a VMS system service problem.
Technical Details
Message-ID: <8703180153.AA25871@ucbvax.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!think!ames!ucbcad!ucbvax!LBL.ARPA!nagy%bsndbg.hepnet

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!think!ames!ucbcad!ucbvax!LBL.ARPA!nagy%bsndbg.hepnet
From: nagy%bsndbg.hepnet@LBL.ARPA
Newsgroups: mod.computers.vax
Subject: SYS$SETIMR non-problem (AST routines and FORTRAN)
Message-ID: <8703180153.AA25871@ucbvax.Berkeley.EDU>
Date: Tue, 17-Mar-87 07:07:48 EST
Article-I.D.: ucbvax.8703180153.AA25871
Posted: Tue Mar 17 07:07:48 1987
Date-Received: Thu, 19-Mar-87 02:48:29 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 79
Approved: info-vax@sri-kl.arpa