If anyone could suggest a reason why Label[begin] ... Goto[begin]
would return Hold[Goto[Begin]]
, and (better) how can I avoid this problem, I'd appreciate it. I suspect this is an outmoded control structure for simple programs, but I like it.
I had an earlier version of Mathematica and it was fickle. Sometimes adjusting the spacing cured the problem. The newer version is less forgiving, if it is user error.
Edit: a silly example maybe but it gives the error message.
p[1] = .9; i = 1; Label[begin];
i++;
p[i] = p[i - 1] + 1;
Print[i];
If[i < 5, Goto[begin], Goto[end]];
Label[end];
2
Goto::nolabel: Label begin not found. >>
Hold[Goto[begin]]
$IterationLimit
or$RecursionLimit
? $\endgroup$begin
is not in the same compound expression that containsGoto[label]
. $\endgroup$