2003-06-27 20:38:13 +00:00
|
|
|
(princ "Hello ALSA world\n")
|
|
|
|
(princ "One " 1 "\n")
|
|
|
|
(princ "Two " (+ 1 1) "\n")
|
2003-07-01 09:23:38 +00:00
|
|
|
|
2003-07-26 15:19:27 +00:00
|
|
|
(defun myprinc (o) (progn (princ o)))
|
2003-07-01 09:23:38 +00:00
|
|
|
(myprinc "Printed via myprinc function!\n")
|
|
|
|
|
|
|
|
(defun printnum (from to) (while (<= from to) (princ " " from) (setq from (+ from 1))))
|
|
|
|
(princ "Numbers 1-10: ") (printnum 1 10) (princ "\n")
|
|
|
|
|
2003-07-26 15:19:27 +00:00
|
|
|
(defun factorial (n) (if (> n 1) (* n (factorial (- n 1))) 1))
|
2003-07-01 09:23:38 +00:00
|
|
|
(princ "Factorial of 10: " (factorial 10) "\n")
|
2003-07-26 15:19:27 +00:00
|
|
|
|
|
|
|
(princ "Float test 1.1 + 1.35 = " (+ 1.1 1.35) "\n")
|
|
|
|
(princ "Factorial of 10.0: " (factorial 10.0) "\n")
|
2003-07-27 20:20:26 +00:00
|
|
|
|
|
|
|
(setq alist '((one . first) (two . second) (three . third)))
|
|
|
|
(princ "alist = " alist "\n")
|
|
|
|
(princ "alist assoc one = " (assoc 'one alist) "\n")
|
|
|
|
(princ "alist rassoc third = " (rassoc 'third alist) "\n")
|