kasra Posted May 14, 2010 Posted May 14, 2010 Hi all. I 'm trying to write a lisp routine for some purposes that it creates a file with the name i specified for it in the path "D:\myname.txt". this routine is not complete yet and i tested it before completing. As i run this routine, it create the file and then returns this error: ; error: bad argument type: FILE nil Is there anyone who can tell me what does this error mean? How i can solve this error? Quote
MSasu Posted May 14, 2010 Posted May 14, 2010 Please post an excerpt from your code for debug. Regards, Quote
kasra Posted May 14, 2010 Author Posted May 14, 2010 Thanks msasu. I found the reason of producing this error. I have a "while loop" after creation of the file. in this loop i have this prompt line: (princ "\n << ...some statements... AND THEN PRESS "ENTER": >> ") I found that existing of "ENTER" is the reason. Now i have no problem. Quote
MSasu Posted May 14, 2010 Posted May 14, 2010 Should format it like this: (princ "\n << ...some statements... AND THEN PRESS [color=Blue]\[/color]"ENTER[color=Blue]\[/color]": >> ") Regards, Quote
alanjt Posted May 15, 2010 Posted May 15, 2010 I agree with Lee and msasu. However, you can also use the ascii character. eg. (princ (strcat "\n << ...some statements... AND THEN PRESS " (chr 34) "ENTER" (chr 34) ": >> ")) I keep this for reference: Quote
kasra Posted May 15, 2010 Author Posted May 15, 2010 Thanks Alanjt. I 'm interested in different ways but similar actions. Quote
alanjt Posted May 15, 2010 Posted May 15, 2010 Thanks Alanj.I 'm interested in different ways but similar actions. No problem. I would and do do it the way Lee and msasu suggested, but the ascii characters are very useful to know. I refer to this from time to time. You can also find out an ascii character by using the ascii command. eg. Command: (ascii "3") 51 and chr to to in reverse. eg. Command: (chr 51) "3" Quote
kasra Posted May 15, 2010 Author Posted May 15, 2010 I would try to use your good offer. Thanks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.