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

From: Alison Boeckmann Date: March 27, 2014 technical Source: mail-archive.com
Pavel, glad to know you solved the problem. The variable name R1 is probably safe enough to use in your control stream, but could be problematic if you wanted to model infusion rate into compartment 1. R1 would be a reserved variable in $PK: $PK R1=... Now there might be a conflict with use of R1 in the other block. I suggest a variable name such as RR that is never reserved under any circumstances. - Alison
Quoted reply history
On Thu, Mar 27, 2014, at 06:50 AM, Pavel Belo wrote: Hello Allison, Yes, it is solved. There was another R variable used for approximation of normal probability densith in another block. I calledit R1 and it was resolved. Silly.... I spent 1.5 hours massaging this code. Thanks! Pavel On Thu, Mar 27, 2014 at 08:57 AM, Alison Boeckmann wrote: Pavel, have you solved your problem yet? The only way I can reproduce this error message is to use R on the left in another block (such as $ERROR or $DES) prior to its appearance in the $PK block. This causes R to be listed in NMPRD4, which gives rise to the error message. Can you send me your complete control stream? On Wed, Mar 26, 2014, at 05:23 PM, Pavel Belo wrote: 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. 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 -- Alison Boeckmann [1][email protected] References 1. mailto:[email protected] -- Alison Boeckmann [email protected]