about scoping in modules
- To: mathgroup at smc.vnet.net
- Subject: [mg85769] about scoping in modules
- From: P_ter <peter_van_summeren at yahoo.co.uk>
- Date: Thu, 21 Feb 2008 18:05:04 -0500 (EST)
- Organization: The Math Forum
Hello, in the next two modules I would like that the inner module uses a variable from the outer module. mfb[oneObj_] := Module[{ttmp = oneObj},AppendTo[ global2mfb, ttmp]] mfa[e_] := Module[{global2mfb = e, t = 3},mfb[t] ] mfa[{2,3}] gives a message that global2mfb is not a variable with a value, so it can not be changed. It means I do not understand the concept of module in Mathematica. My questions are: 1. why does it go wrong? 2. how can I realize what I want? with friendly greetings, P_ter
- Follow-Ups:
- Re: about scoping in modules
- From: Sseziwa Mukasa <mukasa@jeol.com>
- Re: about scoping in modules