Re: Dialogs and inheritance
- To: mathgroup at smc.vnet.net
- Subject: [mg76476] Re: Dialogs and inheritance
- From: Szabolcs <szhorvat at gmail.com>
- Date: Wed, 23 May 2007 05:09:08 -0400 (EDT)
- Organization: University of Bergen
- References: <f2u3c3$j45$1@smc.vnet.net> <4652ABEF.9080503@gmail.com>
Szabolcs wrote:
> alexxx.magni at gmail.com wrote:
>> Hello,
>> I'm trying to learn to use Dialogs for debugging purposes - since I
>> cannot learn the right way to use the integrated debugger.
>> Can you please tell me what is wrong in the following???
>>
>> In[1]:= Module[{a},
>> Do[
>> a = {i, Sin[i]};
>> Dialog[],
>> {i, 100}]]
>>
>> (Dialog) In[2]:= i
>>
>> (Dialog) Out[2]= 1
>>
>> (Dialog) In[3]:= a
>>
>> (Dialog) Out[3]= a
>>
>> I thought under Dialog I could be able to see all the local values of
>> the variables!
>>
>> P.S. any hint on where to start with the integrated debugger? The V6
>> guide: guide/TuningAndDebugging is rather limited...
>>
>> thanks!
>>
>> Alessandro Magni
>
>
> I have never used Dialog before, but the problem seems to be that
> "local" variables are simply renamed variables in Mathematica.
>
> Try this: Module[{a}, a]
>
> I do not know why did they choose this solution for local variables ...
>
> I have no idea about how could you get the "local name" of 'a' in the
> example you gave.
>
> Szabolcs
This might help ... :
http://reference.wolfram.com/mathematica/tutorial/HowModulesWork.html
http://reference.wolfram.com/mathematica/tutorial/ModularityAndTheNamingOfThingsOverview.html