Dizzle517 Posted September 24, 2013 Posted September 24, 2013 Ok I'm new to LISP. I'm trying to get a simple LISP to convert a number in inches to mm and and also the other way around a number in mm to inches. Thanks for the help Quote
dbroada Posted September 24, 2013 Posted September 24, 2013 why do you want a LISP? Isn't the built in calculator (with its own conversion tables) sufficient? Quote
Dizzle517 Posted September 24, 2013 Author Posted September 24, 2013 It is sufficient but I'm just working on using LISP and I was just wondering if there is a LISP for that. Quote
Tuns Posted September 24, 2013 Posted September 24, 2013 (edited) Do you mean you want to change a dimension that is in inches into mm and vice versa? If not then, inches to mm: ^c^cUserr1;\$M=$(*,$(getvar,userr1),25.4) mm to inches: ^c^cUserr2;\$M=$(/,$(getvar,userr2),25.4) They're not lisp but they will return the value of the dimension in the command line. Updated: I didn't like USERI1 that much so I changed it to USERR1. Edited September 24, 2013 by Tuns Quote
Cad64 Posted September 24, 2013 Posted September 24, 2013 I've moved your question to the Lisp section. For best results, try to post your question in the correct area of the forum. Quote
Tharwat Posted September 24, 2013 Posted September 24, 2013 (defun i2m (i) (* i 25.4) ) Usage : (i2m 1.0) should return 25.4 Quote
neophoible Posted September 27, 2013 Posted September 27, 2013 (defun mm-to-inches (mm) (/ mm 25.4) ) Excuse me for saying so, but it seems that this is a very simple conversion to be asking for. Are you new to programming as well? Are you availing yourself of the tons of help on this and other related sites? 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.