Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128063] Re: compile fct. using Goto and If (vrs. 8)
  • From: Chris <kristoph.steikert at gmail.com>
  • Date: Thu, 13 Sep 2012 03:37:03 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k2mnqc$54f$1@smc.vnet.net>

Am Dienstag, 11. September 2012 09:05:56 UTC+2 schrieb Chris:
> 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"]]
> 
> ];

If just found out that it is print command. Sorry for bothering. 



  • Prev by Date: Re: compile fct. using Goto and If (vrs. 8)
  • Next by Date: Re: Begginer's question: Saving a function for later use
  • Previous by thread: Re: compile fct. using Goto and If (vrs. 8)
  • Next by thread: Re: 2 Assumptions for one parameter?