Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: loading autosaved package using Needs[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95109] Re: loading autosaved package using Needs[]
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 7 Jan 2009 04:04:53 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <gjv73o$ovh$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

the word "package" is used in two meanings. The most common
is "A Mathematica package, that generate a context for all its symbols
and add some useful new functions."
you have the second version
"A collection of Mathematica definitions without a individual context,
including data, definitions, computation results and unstructured stuff."

Needs[] will only work, if you package generate its own  context.

Regards
   Jens

Mitch Murphy wrote:
> according to comment at the top of autosaved packages, these files can  
> be loaded using Needs[] instead of Get[].
> 
> (************************************************************************)
> (* This file was generated automatically by the Mathematica front  
> end.  *)
> (* It contains Initialization cells from a Notebook file,  
> which         *)
> (* typically will have the same name as this file except ending  
> in      *)
> (* ".nb" instead of  
> ".m".                                               *)
> (*                                                                      *)
> (* This file is intended to be loaded into the Mathematica kernel  
> using *)
> (* the package loading commands Get or Needs.  Doing so is  
> equivalent   *)
> (* to using the Evaluate Initialization Cells menu command in the  
> front *)
> (*  
> end.                                                                 *)
> (************************************************************************)
> 
> it doesn't work for me...
> 
> 	Needs["phd_thesis_common.m"]
> 	Needs::cxt: Invalid context specified at position 1 in  
> Needs[phd_thesis_common.m]. A context must consist of valid symbol  
> names separated by and ending with `. >>
> 
> any help/suggestions appreciated.
> 
> thanks,
> Mitch
> 


  • Prev by Date: Re: how to solve this problem?
  • Next by Date: Matrix-Multiplication w NonCommutative Entries?
  • Previous by thread: Re: loading autosaved package using Needs[]
  • Next by thread: Re: loading autosaved package using Needs[]