Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

First question

  • To: mathgroup at
  • Subject: [mg52091] First question
  • From: dto_mba at
  • Date: Wed, 10 Nov 2004 04:45:44 -0500 (EST)
  • Sender: owner-wri-mathgroup at

How to exit directly and immediately a module from inside a loop with 
a certain value ?
Return seems not to work.


lmaa := Module[
     If[i > 3, Return[{"from inside"}]],
     {i, 1, 5}
   Return[{"not from inside"}]


{not from inside}


Gilbert Gosseyn

  • Prev by Date: fourier ( FFT )
  • Next by Date: Two y-axes in one graph
  • Previous by thread: Re: fourier ( FFT )
  • Next by thread: Re: First question