barristann Posted February 11, 2023 Share Posted February 11, 2023 Hi all, How to I set a my variable dist to 200 inch? (setq dist 200") ;;;;doesn't work Please help Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 11, 2023 Share Posted February 11, 2023 A variable is set to the value implied a real, integer or string so (setq dist 200) is just that 200 as a value, if you want it to be inches you need to work with all variable in same units, if you are calculating in feet then need to do (setq dist (/ 200 12.)) note the "." so get a real answer not an integer answer. 1 1 Quote Link to comment Share on other sites More sharing options...
barristann Posted February 11, 2023 Author Share Posted February 11, 2023 This is the answer I need. Thank you BIGALL. Quote Link to comment Share on other sites More sharing options...
mhupp Posted February 11, 2023 Share Posted February 11, 2023 this is where getdist shines (setq dist (getdist "\nEnter distance")) you can enter 200, 200", 16'8", or pick points with a mouse. 1 Quote Link to comment Share on other sites More sharing options...
barristann Posted February 12, 2023 Author Share Posted February 12, 2023 That works too. Thanks mhupp. Quote Link to comment Share on other sites More sharing options...
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.