Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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

Re: First question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52127] Re: [mg52091] First question
  • From: Andrzej Kozlowski <andrzej at akikoz.net>
  • Date: Thu, 11 Nov 2004 04:52:59 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I just copied your post and forgot to change the second Return also to 
Throw.

Andrzej


On 11 Nov 2004, at 04:36, dto_mba at skynet.be wrote:

> Throw ? Catch ? , are we talking about Baseball ? :-)
>
> Why does the Catch include 'Return[{"not from inside"}]' ?
>
> Best,
>
> GG
>
>
> -- snip
>
>
>>
>> Method 2 (recommended):
>>
>>
>> lmaa := Module[
>> {},
>>   Catch[ Do[
>>      If[i > 3, Throw[{"from inside"}]],
>>      {i, 1, 5}
>>    ];
>>    Return[{"not from inside"}]]
>> ]
>>
>>
>>
>> lmaa
>>
>>
>> {from inside}
>>
>>
>> Finally, there is absolutely no point using a Module whiteout any 
>> local variables.
>>
>>
>>
>> Andrzej Kozlowski
>> Chiba, Japan
>> http://www.akikoz.net/~andrzej/
>> http://www.mimuw.edu.pl/~akoz/
>


  • Prev by Date: Re: First question
  • Next by Date: Akiyama-Thurston [1,5] minimal Pisot tile
  • Previous by thread: Re: First question
  • Next by thread: Re: First question