Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11707
| From | Chris <kristoph.steikert@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | compile fct. using Goto and If (vrs. 8) |
| Date | 2012-09-11 07:04 +0000 |
| Message-ID | <k2mnqc$54f$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
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"]]
];
Back to comp.soft-sys.math.mathematica | Previous | Next — 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