brawleyman Posted October 9, 2008 Posted October 9, 2008 Hello! It's me again! Now that I have my macro figured out, I have a lisp that I am trying to tweak to give me only whole number measurements. My lisp is a continued measurement tool that I use to estimate wire travel distances between devices and adds a user input value for drops. The lisp is set up for (rtos lensom 4 0) which gives me an output in architecural units and precision of whole inches. I know the "0" makes it round to the nearest inch, but I want to round to the nearest whole foot. Is there an extra variable I can include to do this or how should I approach it? Thanks! Quote
lpseifert Posted October 9, 2008 Posted October 9, 2008 maybe this... (fix (atoi (rtos (/ lensom 12.0) 2 0))) Quote
brawleyman Posted October 9, 2008 Author Posted October 9, 2008 Hmm...I get error: bad argument type: numberp: nil when I add that to my lisp. What does that mean?... Oh, wait a sec. At first it wasn't working, but I looked again and the "lensom" was supposed to be "lensum". Sorry I typed it wrong in my first post. Here is the solution... (rtos (/ lensum 12) 2 0)) This works exactly the way I wanted it to. Thanks so much AGAIN lpseifert! ***edit*** Sorry about the "quote". I couldn't find the "#" to put in my code, but just realized that I have to be the full editor instead of quick reply to do it. Sorry. I am getting the hang of it here. 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.