MathGroup Archive 1999

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

Search the Archive

Re: calling routine before Needs[]

  • To: mathgroup at
  • Subject: [mg17238] Re: calling routine before Needs[]
  • From: "David Keith" <dkeith at>
  • Date: Fri, 30 Apr 1999 02:34:33 -0400
  • Organization: Hevanet Communications
  • References: <7f9fh4$> <7fbqt3$crk$> <7fp5fl$>
  • Sender: owner-wri-mathgroup at

I missed the first of this . . . . but

Perhaps you're referring to the situation that occurs when the user of a
package mistakenly calls a function before loading the package, causing the
function symbol to be defined in the global context and overshadow the
package function even after the package is loaded.

If so, Maeder describes one way to prevent this in his book "Programming in
Mathematica". (I have the 1st edition where it's on p. 50.)  He suggests
importing the globa context in the package by using


Now there is only one symbol for function, and it is modified by the package
when loaded.

Dan Truong wrote in message <7fp5fl$3cv at>...
>Neat, but won't do...
>I can't just redefine the name of the functions in my pckage at each
>I need a way to delete all prior definitions of the routine or the
>so I can redefine them safely, for example if the programmer calls a
>routine be
>fore it's file is loaded.
>David Reiss wrote:
>> In[1]:= ?Unique
>> "Unique[ ] generates a new symbol, whose name is of the form $nnn.
>> generates a new symbol, with a name of the form x$nnn. Unique[{x, y,
... }]
>> generates a list of new symbols. Unique[\"xxx\"] generates a new symbol,
>> a name of the form xxxnnn."

  • Prev by Date: Re: Extendraphics(&MathLink) package problem
  • Next by Date: INFORMATIONS
  • Previous by thread: Re: calling routine before Needs[]
  • Next by thread: Propositional Logic