| | |
Lisp Load Function
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
Join Date: Mar 2007
Posts: 2
Reputation:
Solved Threads: 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
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
When referring to file paths in Common LISP, it's best to either use the pathname directive:
-or-
...better yet, just use the arbitrary pathname tricks in Common LISP:
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 #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.
Angel-headed hipsters burning for the ancient heavenly connection, to the starry dynamo in the machinery of the night.
-Ginsburg
Don't tell me to "google it" - I already have.
-Ginsburg
Don't tell me to "google it" - I already have.
•
•
Join Date: Mar 2007
Posts: 2
Reputation:
Solved Threads: 0
This was a typing error in this message. The code has the proper backslash and it still will not work properly.
•
•
Join Date: Jun 2008
Posts: 3
Reputation:
Solved Threads: 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
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
It could very well be a permission error. Does your program have permission to read that file?
![]() |
Similar Threads
- Lisp load function in windows (Computer Science)
- please help me: build a binary search tree by Lisp (Legacy and Other Languages)
- Call a external js function into another js function (JavaScript / DHTML / AJAX)
- LISP:i changed the load function accidently...HELP (Computer Science)
Other Threads in the Computer Science Forum
- Previous Thread: What color is the Internet?
- Next Thread: Online education?
Views: 6467 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for Computer Science
ai algorithm algorithms assignmenthelp automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business cern clueless codebreaker compiler computer computers computerscience connect conversion csc data dataanalysis dataintepretation development dfa dissertation dissertations dissertationthesis dissertationtopic employment energy extensions foreclosure foreclosuresoftware fuel gadgets givemetehcodez government graphics hardware history homeowners homework homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod jobs kindle laser laws lazy linkbait lsmeans mainframes mining mobileapplication msaccess nano netbeans news os piracy piratebay principles programming rasterizer research sam-being-cute sas science security sex simulation software spoonfeeding spying sql stephenfry student study supercomputer sweden syntactic technology textfield turing turingtest two'scompliment warehouse ww2






