Re: How to make Package?
- To: mathgroup at smc.vnet.net
- Subject: [mg19937] Re: How to make Package?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 22 Sep 1999 04:11:17 -0400
- Organization: Universitaet Leipzig
- References: <firstname.lastname@example.org>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Dana, it is up to you. You can write the source of the package with a simple ASCII editor or with the FrontEnd. The FrontEnd is nothing else than a word processor (with some special functions). You may look at the packages that come with Mathematica. The older packages are written as plain ASCII files and placed in the directories AddOns/StandardPackages/... Some newer (namely the Notation package) are written and explained in a Notebook. There you can mix formulas, explanations of your code ... with the package definitions. For the "working only" case you can simply save the package and load you definitons without the "explanation overhead". Hope that helps Jens Dana DeLouis wrote: > > Hello. I am new to Mathematica 3 and just read the book "Programming in Mathematica." > I would like to make my own "Package," but the book forgets to mention how > to do this exactly. > In other words, I do not know where the command go, and how to save them to > a file with a *.m extension. Do I need to put the following in 1 cell only, > and use "Save as ..Package"? > Or, do I need to put them in multiple cells? Another article I read gives > the impression I write the lines in a Word processor, and save it as a Text > file with a *.m extension. Could anyone point me in the right direction? > Thank you in advance. Dana > > If I have a simple example: > BeginPackage["MyFile`MyStuff`"] > Something::usage = etc > Begin["`Private`"] > etc > End > EndPackage