MathGroup Archive 2012

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

Search the Archive

Question about Initialization Cells

  • To: mathgroup at
  • Subject: [mg126383] Question about Initialization Cells
  • From: James Stein <james at>
  • Date: Sat, 5 May 2012 04:14:29 -0400 (EDT)
  • Delivered-to:

I downloaded the source code for a Wolfram Demonstrations Project; this one:

The first three cells, all initialization cells, each contain a simple
one-liner, for example:
         dist[p1_, p2_] := Norm[p1 - p2]
When I evaluate any of these cells, it appears to define the function, but
when I try (in a second, new notebook window) to evaluate the function
(e.g., to evaluate "dist[4.5]}), the function is undefined. It is blue i
the second window, even though it is black in the first window.

But If I type "dist[4,5]" in the demonstration project window itself, all
works as expected.

The demo project does not appear to be a package; 'dist' does not seem to
be private. What am I missing?

  • Prev by Date: Re: How does one translate a mathematica program into a C# program? eom
  • Next by Date: Re: New to Mathematica
  • Previous by thread: Re: Error function integral / Wolfram Function reference
  • Next by thread: Re: Question about Initialization Cells