MathGroup Archive 2001

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

Search the Archive

Problem in loading own Package

  • To: mathgroup at
  • Subject: [mg27127] Problem in loading own Package
  • From: Ossama Kullie <kullie at>
  • Date: Sun, 4 Feb 2001 21:27:10 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Dear Mathematica users can you help me?

I have written the folloing  package
PoissonBracket::usage = "PoissonBracket[a, b,n] calculates the Piosson
bracket for tow functions a and b which depend on the variables p, q"
PoissonBracket[a_, b_, n_] := Block[{pk, n},
      pk = 
          Sum[D[a, q[i]]* D[b,p[i]] - D[a,p[i]] * D[b,q[i]], {i,1,n}]]]
 and I have put it in a file Poisson.m, and  tried all possibilties to
load the package but it doesnot work!
 Mathematica has read the file Poisson.m, but the function PoissonBracket
 is not created
  As Example :
 Needs["Poisson`", "Poisson.m"] 
 give the folloing error 
 Needs::nocont: Context Poisson` was not created when Needs was
 or: <<Poisson`
     ?? PoissonBracket
     Information::notfound: Symbol PoissonBracket not found.

 or: Get["Poisson.m"]
   and then
   ?? PoissonBracket
   nformation::notfound: Symbol PoissonBracket not found.
   the folloing information may be usfel to anser my quation
   ?? Poisson

   this give the Output

  {"Global`", "System`"}
 the funktion PoissonBracke work very well, when I create it in my
 Notebook, only in a package doesnot! 
 I cannot find any error, why I cannot load the
 function PoissonBracket from the pachage? .

  • Prev by Date: Re: Negation versus Exponential
  • Next by Date: Re: Parametric Plot
  • Previous by thread: MATHEMATICA PROGRAM
  • Next by thread: Re: Problem in loading own Package