| Author |
Comment/Response |
Dims
|
04/27/10 05:09am
The following definition does work:
f[x_] := (If[x > 5, Return[a]]; x + 3)
(it's from manula)
The following definition does not:
f[x_] := (Do[If[x > 5, Return[a]], {10}]; x + 3)
(returns x+3 all the time)
The only difference of the last definition is that it executes If 10 time. Return[] stops working in such a case.
URL: , |
|