943,691 Members | Top Members by Rank

Ad:
Feb 10th, 2007
0

Lisp load function in windows

Expand Post »
This should be a really simple thing, but for some reason I have had no luck getting anything to work. I have CLISP and GCL, and on neither can I specify where a file is using the load function. I've tried setting the pathname, but it removes the backslashes, so its not looking in any directory, let alone the right one. Basically, I want to do this:

(load "c:\users\documents\john\schoolwork\cs\3600\project3.lisp")

But it says it can't find the file c:usersdocumentsjohnschoolworkcs3600project3.lisp

similarly when I try and set the pathname, it removes the backslashes. Anyone know what I'm donig wrong? I figure it's something really simple, but I just can't figure it out, and none of the documentation actually has examples with a windows path involved.

Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
JaggyGT is offline Offline
1 posts
since Feb 2007
Feb 11th, 2007
0

Re: Lisp load function in windows

Try using forward slashes ( / ) instead of back slashes ( \ ).

Read this.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Feb 14th, 2007
0

Re: Lisp load function in windows

If the backslash is used to start escape sequences in Lisp, the compiler will remove it and replace it with whatever \u (for example) represents (which may be nothing). Try escaping each backslash with a backslash i.e.
lisp Syntax (Toggle Plain Text)
  1. (load "c:\\users\\documents\\john\\schoolwork\\cs\\3600\\project3.lisp")

If this fixes the problem it is likely this rule wil apply in all quoted strings within the language.

Steven.
Reputation Points: 47
Solved Threads: 1
Posting Whiz in Training
Mushy-pea is offline Offline
271 posts
since Jun 2006
Jan 14th, 2009
0

Re: Lisp load function in windows

Click to Expand / Collapse  Quote originally posted by JaggyGT ...
This should be a really simple thing, but for some reason I have had no luck getting anything to work. I have CLISP and GCL, and on neither can I specify where a file is using the load function. I've tried setting the pathname, but it removes the backslashes, so its not looking in any directory, let alone the right one. Basically, I want to do this:

(load "c:\users\documents\john\schoolwork\cs\3600\project3.lisp")

But it says it can't find the file c:usersdocumentsjohnschoolworkcs3600project3.lisp

similarly when I try and set the pathname, it removes the backslashes. Anyone know what I'm donig wrong? I figure it's something really simple, but I just can't figure it out, and none of the documentation actually has examples with a windows path involved.

Thanks.
----------------------
Get rid of the double quotes and make them single quotes, lisp is reading your backslashes as attempted escape characters and stringing the whole thing together.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rockout690 is offline Offline
2 posts
since Jan 2009
Jan 14th, 2009
0

Re: Lisp load function in windows

change the single backslashes to doubles
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rockout690 is offline Offline
2 posts
since Jan 2009

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: Distance Learning in IT/CS?
Next Thread in Computer Science Forum Timeline: BASE SAS CERTIFICATION





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


Follow us on Twitter


© 2011 DaniWeb® LLC