MathGroup Archive 2004

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

Search the Archive

Re: Shared variables between notebooks?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46812] Re: Shared variables between notebooks?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 9 Mar 2004 04:30:57 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <c2eoe7$t3e$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

als long as you use the same Kernel for all you notebooks
you must share the definition because you running FrontEnd
send all you to the same Kernel.

You can open different contexts in you notebooks to minimize the
interferences or you  run more than a single kernel.

Get[] will in some sense do what #include in C/C++ does.
But you are running a interpreter and noy a compiler.

Regards
  Jens

Neal Richter wrote:
> 
> Hello,
>     I'm using Mathematica 4.1 for Linux and am noticing some odd
> behavior.
> 
> 1) It appears that when I have multiple notebooks open, the variables
> and functions are 'shared'..  ie they have global scope.  Can I change
> this?
> 
> 2) Is there a "#include" type command in mathematica?   I'd like to be
> able to have a notebook with common functions I use, and include it in
> other notebooks where use the functions.
> 
> As you can tell I'm a C/C++ programmer.  Has anyone on the list used
> the Mathematica->C++ code generator?  Opinions?
> 
> Thanks!
> 
> Neal Richter


  • Prev by Date: Re: ReplaceList -- Unexpected Answer
  • Next by Date: Re: ReplaceList -- Unexpected Answer
  • Previous by thread: RE: Shared variables between notebooks?
  • Next by thread: Differences in Random Numbers