Re: symbold and packages
David Mittman <[email protected]> Thu, 8 Jul 2004 15:15:21 -0700
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <p06020460bd13775d2afb@[134.4.61.206]> |
Defining the p1::goo function like this might help: (in-package p1) (defun goo () (p2::test 'p2::p)) Other than that, I'd have to know more about what you see as the problem and what you intend these functions to do. At 5:11 PM -0400 7/8/04, Fabrizio Morbini wrote: >Hi All, I have the following problem: > >-two lisp files, one is in package p1 and the other in package p2. -from >package user I call (p1::goo). Inside p1::goo it is called a function >defined in p2 with one argument (lets call this function in p2: fp2). >-inside fp2 I compare the argument of the function (with the function >member) with a global variable defined (with defparameter) in p2. > >To make the thing more clear this is an example: > >******file p1.lisp >(defpackage p1) >(defpackage p2) >(in-package p1) > >(defun goo () > (p2::test 'p) > ) > >******file p2.lisp >(in-package p2) > >(defparameter *test* '(p q r)) > >(defun fp2 (x) > (print x) > (print *test*) > (print (member x *test*)) > ) > >What I get is: > >CL-USER(1): :ld p1.lisp >; Loading p1.lisp >CL-USER(2): :ld p2.lisp >; Loading p2.lisp >CL-USER(3): (p1::goo) > >P1::P >(P2::P P2::Q P2::R) >NIL > >-------------- > >Is there a better way to solve the problem instead of using >(read-from-string (format nil "~a" *test*))? > >Thanks, Fabrizio. > >--- >[This E-mail scanned for viruses by Declude Virus] -- David Mittman ([email protected])