Lisp load function in windows

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Feb 2007
Posts: 1
Reputation: JaggyGT is an unknown quantity at this point 
Solved Threads: 0
JaggyGT JaggyGT is offline Offline
Newbie Poster

Lisp load function in windows

 
0
  #1
Feb 10th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,581
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 461
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Lisp load function in windows

 
0
  #2
Feb 11th, 2007
Try using forward slashes ( / ) instead of back slashes ( \ ).

Read this.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 263
Reputation: Mushy-pea is an unknown quantity at this point 
Solved Threads: 1
Mushy-pea's Avatar
Mushy-pea Mushy-pea is offline Offline
Posting Whiz in Training

Re: Lisp load function in windows

 
0
  #3
Feb 14th, 2007
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.
  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.
The one question you should not ask when teaching a new language structure is "Do you understand?". Do you understand?
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 2
Reputation: rockout690 is an unknown quantity at this point 
Solved Threads: 0
rockout690 rockout690 is offline Offline
Newbie Poster

Re: Lisp load function in windows

 
0
  #4
Jan 14th, 2009
Originally Posted by JaggyGT View 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.
----------------------
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 2
Reputation: rockout690 is an unknown quantity at this point 
Solved Threads: 0
rockout690 rockout690 is offline Offline
Newbie Poster

Re: Lisp load function in windows

 
0
  #5
Jan 14th, 2009
change the single backslashes to doubles
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Computer Science Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC