Commit 502d6464 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Check of undefined system of units

parent e85d75dc
;; Define physical dimensions and units of measure and systems of units.
;; Liam Healy Wed Feb 27 2002 - 13:18
;; Time-stamp: <2013-06-03 12:29:17EDT units.lisp>
;; Time-stamp: <2013-09-21 17:10:40EDT units.lisp>
;; Copyright 2011, 2013 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
......@@ -212,6 +212,7 @@
(nf-option :system-of-units)
(make-sysunits units system-of-units))
;;(warn "Set default system of units.")
(assert (nf-option :system-of-units) nil "System of units ~a is not defined." system-of-units)
(values))
(defmacro with-system-of-units ((system-of-units &rest units) &body body)
......@@ -371,11 +372,11 @@
(make-ue (/ remainder cd))))))))
;;; This is the inverse of parse-unit-sexp
;;; (make-unit-sexp '(2 -4 3 0 0 0 0 0 0))
;;; (make-unit-sexp '(2 -4 3 0 0 0 0 0 0) t)
;;; (* (EXPT NEWTON 2) KILOGRAM)
;;; (make-unit-sexp '(-2 1 1 0 0 0 0 0 0))
;;; (make-unit-sexp '(-2 1 1 0 0 0 0 0 0) t)
;;; (/ (* KILOGRAM SECOND) (EXPT METER 2))
;;; (make-unit-sexp '(1/2 0 0 0 0 0 0 0 0))
;;; (make-unit-sexp '(1/2 0 0 0 0 0 0 0 0) t)
(defun make-unit-sexp (dimel scalar-dimensions)
"From the dimel (list of dimension exponents),
make an unit sexp."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment