Pascal Costanza <pc@p-cos.net> wrote:
+---------------
| Mark Carter wrote:
| > (require 'string)
| > (import 'string::strcat)
| >
| > (strcat "mark" " carter" " was here")
...
| > However, at the call to strcat, it says
| > the function STRCAT is undefined
|
| Hm, maybe you are compiling the code, so the compiler doesn't see
| 'strcat because import is only executed at runtime. (But I am just
| guessing here.)
+---------------
Sounds like a good guess to me. If he's compiling the using program,
the symbol STRCAT will get INTERN'd in the using code's package
*before* the REQUIRE & IMPORT get done. I'll bet the following
would work better:
(eval-when (:compile-toplevel :load-toplevel :execute)
(require 'string)
(import 'string::strcat))
(strcat "mark" " carter" " was here")
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607