Re: First question
- To: mathgroup at smc.vnet.net
- Subject: [mg52125] Re: [mg52091] First question
- From: DrBob <drbob at bigfoot.com>
- Date: Thu, 11 Nov 2004 04:52:50 -0500 (EST)
- References: <200411100945.EAA11265@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
lmaa := Catch[Do[If[i > 3, Throw@"from inside"], {i, 1, 5}]; "not from inside"] lmaa from inside Bobby On Wed, 10 Nov 2004 04:45:44 -0500 (EST), <dto_mba at skynet.be> wrote: > How to exit directly and immediately a module from inside a loop with > a certain value ? > Return seems not to work. > > Example: > > lmaa := Module[ > {}, > Do[ > If[i > 3, Return[{"from inside"}]], > {i, 1, 5} > ]; > Return[{"not from inside"}] > ] > > > lmaa > > {not from inside} > > Best > > Gilbert Gosseyn > > > > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- First question
- From: dto_mba@skynet.be
- First question