944,111 Members | Top Members by Rank

Ad:
Mar 21st, 2007
0

Lisp Load Function

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
WD40 is offline Offline
2 posts
since Mar 2007
Mar 21st, 2007
1

Re: Lisp Load Function

You're missing a slash. You mean \\testload.
Team Colleague
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Rashakil Fol is offline Offline
2,479 posts
since Jun 2005
Mar 22nd, 2007
0

Re: Lisp Load Function

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"))
Last edited by indienick; Mar 22nd, 2007 at 5:36 pm.
Reputation Points: 23
Solved Threads: 2
Junior Poster in Training
indienick is offline Offline
71 posts
since Aug 2005
Mar 23rd, 2007
0

Re: Lisp Load Function

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
WD40 is offline Offline
2 posts
since Mar 2007
Jul 1st, 2008
0

Re: Lisp Load Function

Click to Expand / Collapse  Quote originally posted by WD40 ...
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]
Last edited by Narue; Jul 1st, 2008 at 11:36 am. Reason: Snipped links
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hexagon2008 is offline Offline
3 posts
since Jun 2008
Jul 1st, 2008
0

Re: Lisp Load Function

It could very well be a permission error. Does your program have permission to read that file?
Reputation Points: 33
Solved Threads: 2
Light Poster
Ken Sharpe is offline Offline
48 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: Any clue for my Graduation project
Next Thread in Computer Science Forum Timeline: Online education?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC