Re: call random: 372 "R" IN CALL RANDOM MAY NOT BE USED GLOBALLY IN ANOTHER BLOCK.

From: Pavel Belo Date: March 27, 2014 technical Source: mail-archive.com
Thank you Nick. It does not work. The error message is the same. It is strange. It almost looks like a bag or an installation issue. I tried it on different computers.
Quoted reply history
On Wed, Mar 26, 2014 at 06:33 PM, Nick Holford wrote: Pavel, The solution is to assign R to another variable. I've also re-structured your code to make things clearer (IMHO). $PK IF (ICALL.EQ.4) THEN ; only one ICALL.EQ.4 block is needed IF (NEWIND.NE.2) THEN CALL RANDOM(2,R) UNUM=R ; save R value in a new variable ENDIF IF (UNUM.LE.0.1855) THEN ; only 1 logical test is required HM=1 ELSE HM=0 ENDIF ENDIF On 27/03/2014 11:23 a.m., Pavel Belo wrote: Hello NONMEM73 Users, I try to use call random: $PK IF (ICALL.EQ.4.AND.NEWIND.NE.2) CALL RANDOM(2,R) IF (ICALL.EQ.4.AND.R.LE.0.1855) HM=1 IF (ICALL.EQ.4.AND.R.GT.0.1855) HM=0 It does not matter how I try to code it, I am receiving the same error message: 372 "R" IN CALL RANDOM MAY NOT BE USED GLOBALLY IN ANOTHER BLOCK. What is wrong with with it? Thank you, Pavel