Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

RE: Package problem

  • To: mathgroup at
  • Subject: [mg34721] RE: [mg34711] Package problem
  • From: "David Park" <djmp at>
  • Date: Mon, 3 Jun 2002 01:46:40 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

> The package starts :
> BeginPackage["Roulette`BallSim1`"]

So far, so good. Now create a folder named Roulette in the
AddOns\ExtraPackages folder. Put your package notebook there. Your package
notebook should have the name BallSim1.nb. Make all of the statements in
your notebook separate cells as far as possible. And make them
Initialization cells. When you save your notebook choose to create an
AutoSavePackage. This will create the BallSim1.m package file and each time
you modify the BallSim1.nb notebook and save it, the package file will also
automatically be updated. You should never have to directly edit a .m file.

Now load the package with


Also, I'm believe the names are case sensitive. Notice that the leading
context names are like directory paths. Mathematica automatically looks in
StandardPackages and ExtraPackages so you only have to give the context path
from that point down. That should work.

David Park
djmp at

> From: Graham [mailto:lamontgra at]
To: mathgroup at
> I am trying to create a package and read it in.
> The package starts :
> BeginPackage["Roulette`BallSim1`"]
> BallFall::usage = "Performs simulation of ball motion through fluid"
>  (* BallFall
>     a:: drag coefficient (a*v^2)
> But I get this:
> Get["ballsim1`"]
> Notebook[{Cell[
>       BoxData[{RowBox[{RowBox[{"BeginPackage", "[",
> "\"Roulette`BallSim1`\"",
>                   "]"}], "\n"}], "\[IndentingNewLine]",
>           RowBox[{RowBox[{"BallFall", "::", "usage"}], "=", " ",
>               RowBox[{"\"Performs simulation of ball motion
> through fluid\"",
>                    "\[IndentingNewLine]", " "}],
>               RowBox[{"(*", " ",
>                   RowBox[{"BallFall", "\n",
>                       RowBox[{RowBox[{"a", "::", " ", "drag"}], " ",
>                           "coefficient",
> Whtas happening ?
> Is the file corrupt perhaps ?
> Can you edit .m files in the notebook interface ?
> Thanks
> Graham

  • Prev by Date: RE: eliminate some characters inside a file
  • Next by Date: RE: Re: Is it possible to access internal variables?
  • Previous by thread: Package problem
  • Next by thread: Re: Package problem