Goto doesn’t recognize the label:
For[j = 1, j <= 10, j++,
For[i = 1, i <= 10, i++,
If[i == 3 && j == 4, Goto["ab"]]
]];
Label["ab"];
Print[i, j]
Goto doesn’t recognize the label:
For[j = 1, j <= 10, j++,
For[i = 1, i <= 10, i++,
If[i == 3 && j == 4, Goto["ab"]]
]];
Label["ab"];
Print[i, j]
As explained in Problem with Label in a Do loop you need to have Goto and Label inside the same CompoundExpression.
For your case each line is a separate one. Quick fix is to wrap them with ():
(
For[j = 1, j <= 10, j++,
For[i = 1, i <= 10, i++, If[i == 3 && j == 4, Goto["ab"]]]];
Label["ab"];
Print[i, j]
)
Thanks.