Update of /cvsroot/alsa/alsa-lib/alsalisp In directory sc8-pr-cvs1:/tmp/cvs-serv15984/alsalisp
Modified Files: hello.lisp Log Message: Added float number support Replaced 'int' with 'long' (integer type) Improved garbage collect Index: hello.lisp =================================================================== RCS file: /cvsroot/alsa/alsa-lib/alsalisp/hello.lisp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- hello.lisp 1 Jul 2003 09:23:38 -0000 1.2 +++ hello.lisp 26 Jul 2003 15:19:27 -0000 1.3 @@ -2,11 +2,14 @@ (princ "One " 1 "\n") (princ "Two " (+ 1 1) "\n") -(defun myprinc (o) (princ o)) +(defun myprinc (o) (progn (princ o))) (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") -(defun factorial (n) (when (> n 0) (* n (factorial (- n 1))))) +(defun factorial (n) (if (> n 1) (* n (factorial (- n 1))) 1)) (princ "Factorial of 10: " (factorial 10) "\n") + +(princ "Float test 1.1 + 1.35 = " (+ 1.1 1.35) "\n") +(princ "Factorial of 10.0: " (factorial 10.0) "\n") ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog