MathGroup Archive 1997

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

Search the Archive

Re: setting user defined packages in MMA3.0 for Windows

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8023] Re: setting user defined packages in MMA3.0 for Windows
  • From: dtharvat at brain.uccs.edu (Dave Harvatin)
  • Date: Sat, 2 Aug 1997 22:32:34 -0400
  • Organization: University of Colorado at Boulder
  • Sender: owner-wri-mathgroup at wolfram.com

If you are using MMA 3.x, you can do one of the following:

1)  Declare the cell containing the package commands to be an
initialization cell.  Highlight the cell, then from the Menu commands
select:  "Cell", "Properties", "Initialization".  Now save the
notebook and when the popup menu says "Auto Save Package" respond with
"Create Auto Save Package".  MMA will automatically save a copy of the
initialization cell as a package with the .m file extension.

OR

2)  Save the notebook as a package file.  You have to manually type in
the file name with the .m file extension in the dialog box
window--selecting the package file type from the drop down menu won't
do it.  This method should work in pre MMA 3.x versions.  But I found
that in some instances with pre MMA 3.x versions, there was a bug in
the notebook frontend and it was best just to write the package in a
standard text editor and save it with the .m file extension.

Dave Harvatin

On 31 Jul 1997 03:49:25 GMT, "jmt" <jmt at cybercable.tm.fr> wrote:

>If I write a package, say
>
>BeginPackage["myPackage`"]
>f::usage="f does strictly nothing"
>Begin["Private`"]
>f[_]=Null
>EndPackage[]
>End[]
>
>using an ordinary notebook, I will have to save it, let's say myPackage.nb
>If I read this notebook, using << or Get, the content of the file is not
>evaluated: no "myPackage`" context is happened to $ContextPath.
>
>It I use the command File->Save As Special->Package Format, I'm not asked
>wether I want the file to be either .nb or .m, the standard is .nb
>
>Could someone tell me why, in either case, this command encloses all the
>text in comment quotations marks (* and *) , which make all this text a
>comment and then again no evaluation can take place. I have to remove these
>marks manually and save the file before I can (successfully) read it and
>use its functions.
>
>
>
>



  • Prev by Date: [Q] Printing on Brother HL-10h
  • Next by Date: Baker-Campbell-Hausdorff formula
  • Previous by thread: [Q] Printing on Brother HL-10h
  • Next by thread: Baker-Campbell-Hausdorff formula