View Full Version : divide by zero
tom.g
2007-07-05, 10:28 PM
Hello Cad people,
I"m using a .lsp program that give me the error message "error: divide by zero".
I have used this program successfully for years. Anyone know what could be causing the error?
I hesitate to include the code because it's pretty long.
Thanks
Tom Goodman
Ed Jobe
2007-07-05, 11:42 PM
I moved this thread since you stated that it specifically involved lisp.
Tom, if you don't include the lisp, please include some information. That's like saying "my car is making noise, how much will it take to fix it." If you don't want to paste the code into the post, attach it. Include information like, what you were doing at the time it errored, editor conditions.
ccowgill
2007-07-06, 01:14 PM
or if you cant post it, a name of the file might be good, the error you describe is similar to the one I get sometimes when using the pljoin express tool, or mpedit, then I just use a work around and manually join polylines using pedit.
pferreira
2007-07-07, 12:20 AM
Hello Cad people,
I"m using a .lsp program that give me the error message "error: divide by zero".
I have used this program successfully for years. Anyone know what could be causing the error?
I hesitate to include the code because it's pretty long.
Thanks
Tom Goodman
Hello Tom
The Divide by Zero is a very common error and sometimes it is difficult for the autolisp programmer to know were to check and resolve that error, but by my experience it is usually caused by polylines with two vertex's in the same coordinate, this error occurs when we try to evaluate two numbers, one number dividing it by zero!
Well without the source code and an example it is difficult to know what is causing the error, but, if you are using polylines check if the don't have two vertex's in the same coordinate!
Regards
ccowgill
2007-07-09, 02:12 PM
Hello Tom
The Divide by Zero is a very common error and sometimes it is difficult for the autolisp programmer to know were to check and resolve that error, but by my experience it is usually caused by polylines with two vertex's in the same coordinate, this error occurs when we try to evaluate two numbers, one number dividing it by zero!
Well without the source code and an example it is difficult to know what is causing the error, but, if you are using polylines check if the don't have two vertex's in the same coordinate!
Regards
overkill should eliminate the double vertex problem if that is the case
kennet.sjoberg
2007-07-09, 04:07 PM
Why involve overkill, polylines, express tool or whatever . . ?
the main thing must be just "division by zero" in his code
(/ 1 0 ) "Error: divide by zero"
Tom, check your variables in your code, they may be zero.
: ) Happy Computing !
kennet
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.