;macro que permite converter pés e polegadas para metros ;this macro converts Imperial system (feet and inches) to meters ;Esta macro foi realizada por Luís Romão como exemplo de macro (defun c:converter () (print "Insert IS measures (feet/inches/num./den.)") (setq pe (getint "\nWhat is the feet value? ")) (setq pl (getint "\nWhat is the inches value? ")) (setq numerador (getint "\nWhat is the fraction numerator of the inches value ? ")) (setq denominador (getint "\nWhat is the fraction denominator of the inches value? ")) (cv pe pl numerador denominador) ) (defun cv (pe pl numerador denominador) (if (or (= numerador 0)(= denominador 0)) (atof (rtos (+ (* pe 0.3048) (* pl 0.0254)) 2 3)) (atof (rtos (+ (* pe 0.3048) (* (+ pl (/ (float numerador) denominador)) 0.0254)) 2 3)) )) ;float: converts number to real number