0

I am using common lisp for customizing CoCreate Cad software.
I am confused regarding the load function.

The following command will load the indicated file:
(load "c:\\temp\\testload")

The following will load the 2nd item but the 1st item exists:
(load "c:\\temp\testload"
if-does-not-exist
(load "c:\\temp\\testload2")
)

Could somebody please explain why the testload will not load, even though it exists?

The files do not have a file extension and I'd like to run it this way.

Thank You
Bill

5
Contributors
5
Replies
7
Views
10 Years
Discussion Span
Last Post by Ken Sharpe
0

When referring to file paths in Common LISP, it's best to either use the pathname directive: (load #p("/path/to/file") -or-
...better yet, just use the arbitrary pathname tricks in Common LISP:

(load (make-pathname
         :device "c"
         :directory '(:absolute "temp")
         :name "testload"))

Now, however, there's a problem with the syntax of your code; proper Common LISP code for your little snippet should read (NOTE: This example's using arbitrary pathnames.):

(load (make-pathname
         :device "c"
         :directory '(:absolute "temp")
         :name "testload")
  :if-does-not-exist (load (make-pathname :device "c" :directory '(:absolute "temp") :name "testload2"))
0

You're missing a slash. You mean \\testload.

This was a typing error in this message. The code has the proper backslash and it still will not work properly.

0

I am using common lisp for customizing CoCreate Cad software.
I am confused regarding the load function.

The following command will load the indicated file:
(load "c:\\temp\\testload")

The following will load the 2nd item but the 1st item exists:
(load "c:\\temp\testload"
if-does-not-exist
(load "c:\\temp\\testload2")
)

Could somebody please explain why the testload will not load, even though it exists?

The files do not have a file extension and I'd like to run it this way.

Thank You
Bill

Hi

click on following link. read lisp load function.

http://www.lisp.org/HyperSpec/Body/fun_load.html

From
Hexagon software
[removed links]

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.