CompuServe Thread

LISP EMPTY FILES

3 messages in this thread
#21307From: Michael J. EnosMar 29, 1988 4:38 PM
Dear Jamie, Brad I'm still having that trouble with the AutoLISP writing a file with "0" bytes. I think I have a clue. After AutoLISP reaches this point, it can only create files with 0 bytes. For example, I have a file called D:\1.lsp that contains the following routine: (defun doit () (setq mi (open "1.1" "w")) (write-line "AAAAAAAAAAAA" mi) (write-line "BBBBBBBBBBBB" mi) (close mi) ) Normally when I do a (load "D:/1") AutoCAD responds with: DOIT (which is correct) but after AutoLISP starts writing 0 byte files, when I do a (load "D:/1") instead of AutoCAD responding DOIT, it gives me a: "D:/1" (including the quotes!) Why is it doing this? I thought it might be that the file is not getting closed. But I try to manually close it, and AutoLISP says "File not open", so it can't be that. AutoLISP creates the file ok, but something happens that from that point on it only creates empty files. The program OPEN.LSP works fine most of the time, but once AutoLISP starts creating those 0 byte files, OPEN.LSP won't work either. I don't think that its the hardware. Could it be DOS files? Anymore advice??? —– Mike
#21352From: Jamie Clay [Adesk]Mar 30, 1988 12:39 PM
Everything you did works just fine on my machine. (Compaq 386) I don't know what to say, if something that fundamental fails then there is something else going on and it isn't AutoLISP. What do you have in your autoexec.bat and config.sys files ? Are you working out of a ram disk? ADI? Like I said the only time I have seen these results were with a clone machine. I will try and track down what type of machine it was and what the DOS, Bios and hard drive were. Jamie
#21363From: Michael J. EnosMar 30, 1988 4:22 PM
Jamie, Ok, but what does it mean when AutoLISP echoes back the name ofof the LISP routine instead of the name of the function. When everything is OK , when I do a (load "1"), I get a DOIT, but when Acad is flaking out it will instead reply with a "D:/1", instead of a DO (no quotes). Why does it send back the "D:/1"?? —- Mike