Help with functions
- To: mathgroup at smc.vnet.net
- Subject: [mg65612] Help with functions
- From: IronBone <iron.bone at op.pl>
- Date: Tue, 11 Apr 2006 04:04:20 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I have written a simmple function which (in my opinion) should always return False. But it returns True. It seems that Return[False] breaks the Do loop but not returns from the function. I thing I don't understand, what is defining of functions. Can somebody explain me this. fun[x_] := Module[{i}, Do[If[i == 2, Return[False]], {i, 5}]; Return[True]; ] I.B.
- Follow-Ups:
- Re: Help with functions
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Help with functions