Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11717
| From | Frank K <fkampas@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: compile fct. using Goto and If (vrs. 8) |
| Date | 2012-09-12 07:04 +0000 |
| Message-ID | <k2pc5e$99v$1@smc.vnet.net> (permalink) |
| References | <k2mnqc$54f$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
On Tuesday, September 11, 2012 3:05:56 AM UTC-4, Chris wrote:
> 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"]]
>
> ];
You can use CompilePrint to diagnose problems with compiled functions
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
compile fct. using Goto and If (vrs. 8) Chris <kristoph.steikert@gmail.com> - 2012-09-11 07:04 +0000 Re: compile fct. using Goto and If (vrs. 8) Frank K <fkampas@gmail.com> - 2012-09-12 07:04 +0000 Re: compile fct. using Goto and If (vrs. 8) Chris <kristoph.steikert@gmail.com> - 2012-09-13 07:41 +0000
csiph-web