MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

compile fct. using Goto and If (vrs. 8)


Hi 

Below I post some rudimentary and insubstantial code. My basic question is why the command Goto does not work properly when used in an if statement in a compile function. Does anybody know a way around this problem? 

Thanks in advance.
Chris


toy=Compile[{{x,_Real}},
	Label[t];
	y=RandomReal[{-1.,1.}];
	If[x*y<-0.,Print[y*x];Goto[t],Print[y*x," ","done"]]
];



  • Prev by Date: Re: Begginer's question: Saving a function for later use
  • Next by Date: Re: Landau letter, Re: Mathematica as a New Approach...
  • Previous by thread: Re: Begginer's question: Saving a function for later use
  • Next by thread: Re: compile fct. using Goto and If (vrs. 8)