Contents    Page-10    Prev    Next    Page+10    Index   

Examples ...


(defun t2 (P Q)
  (LET ((DX (- (- (+ (CADDR (CURRENTDATE)) 1900)
                  (+ (CADDR (GET (PROG1 P)
                                 'BIRTHDATE))
                     1900))
               (- (+ (CADDR (CURRENTDATE)) 1900)
                  (+ (CADDR (GET (PROG1 Q)
                                 'BIRTHDATE))
                     1900))))
        (DY (- (/ (GET (PROG1 P) 'SALARY) 1000.0)
               (/ (GET (PROG1 Q) 'SALARY)
                  1000.0))))
       (SQRT (+ (* DX DX) (* DY DY)))))

(LAMBDA-BLOCK T2 (P Q)
  (LET ((DX (- (CADDR (GET Q 'BIRTHDATE))
               (CADDR (GET P 'BIRTHDATE))))
        (DY (/ (- (GET P 'SALARY)
                  (GET Q 'SALARY))
               1000.0)))
    (SQRT (+ (* DX DX) (* DY DY)))))