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 2004

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

Search the Archive

Re: including files

  • To: mathgroup at
  • Subject: [mg53174] Re: [mg53161] including files
  • From: "David Annetts" <davidannetts at>
  • Date: Tue, 28 Dec 2004 06:30:13 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Hi Ranjan,

> I wanted to setup an include file that has data on physical 
> constants so that I can include it for all my Mathematica 
> programs using the << command. Since I've never done this 
> before, I'm not really sure if a notebook file can be 
> included or whether the include file has to be a .m file. 
> I tried using the SetDirectory[] command to set the working 
> directory and then included a .nb file which had all the data 
> in it but that didn't work out. I was able to read the file 
> in but the expressions in it were not being evaluated. Can 
> anyone clue me in?

I don't know if it's recommended practice or not, but I customise
$BaseDirectory/Kernel/init.m with appropriate Needs[] and SetOptions[] for
various commands.  All customisation goes before the
Begin["System`Private`"] context.

An alternate method is using the Autoload facility but you'll have to read
the documentation for this.



No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.5 - Release Date: 26/12/2004

  • Prev by Date: shuffling 10^8 numbers
  • Next by Date: Re: including files
  • Previous by thread: Re: including files
  • Next by thread: Re: including files