SYSMGR%UK.AC.KCL.PH.IPG@AC.UK (03/17/87)
From: info-vax-request@uk.ac.ucl.cs 16-MAR-1987 20:50 To: SYSMGR Subj: SYS$SETIMR Received: from CS.UCL.AC.UK by mv1.Cs.Ucl.AC.UK via List-Channel id aa10227; 16 Mar 87 18:18 WET Received: from ucl-cs-vax1 by mv1.Cs.Ucl.AC.UK via Ethernet with SMTP id aa10221; 16 Mar 87 18:17 WET Received: from 44d.cs.ucl.ac.uk by vax1.Cs.Ucl.AC.UK with SMTP id aa04257; 16 Mar 87 18:15 GMT Received: from [10.1.0.2] by 44d.Cs.Ucl.AC.UK via Satnet with SMTP id a016535 16 Mar 87 18:14 GMT Received: from wiscvm.wisc.edu by SRI-KL.ARPA with TCP; Mon 16 Mar 87 06:55:35-P Received: from HASARA5.BITNET by wiscvm.wisc.edu on 03/16/87 at 08:56:24 CST Date: 16 MAR 87 15:54-N From: U00159 <U00159%bitnet.hasara5@edu.wisc.wiscvm> To: INFO-VAX@arpa.sri-kl Subject: SYS$SETIMR Sender: info-vax-request@uk.ac.ucl.cs > I want to execute a routine every 3 seconds. I thought to > do that with SYS$SETIMR. However I have problems with it. (...) > The program here does not compile. .. > subroutine astproc .. .. > status = SYS$SETIMR(,bindelay,astproc,) > if (.not. status) call lib$stop(%VAL(status)) .. > The compiler gives the following messages > FORT-F-INVLEXEME, Variable name, constant or expression invalid in > this context. > [lay,astproc, )] in module astproc It's a feature of the compiler (or a bug). You cannot refer to a subroutine or function's name from within itself, presumably because FORTRAN does not allow recursion and DEC have not realised that the above example does not actually involve recursion. If you put EXTERNAL ASTPROC and the SYS$SETIMR call into another subroutine, and call that from ASTPROC itself, you will successfully fool the compiler and everything will work perfectly. My memory may be at fault, but I think it used to work on the old compiler... Nigel Arnot (Dept. Physics, Kings college, Univ. of London; U.K) Bitnet/NetNorth/Earn: sysmgr@ipg.ph.kcl.ac.uk (or) sysmgr%kcl.ph.vaxa@ac.uk Arpa : sysmgr%ipg.ph.kcl.ac.uk@ucl-cs.arpa