#!/usr/bin/env openlisp -odsp <?xml version="1.0" encoding="UTF-8"?> <!-- OpenLisp Server Page Sample - (c) C. Jullien 2001/09/12 --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>OpenLisp Server Page Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <meta http-equiv="Pragma" content="no-cache" /> <!-- meta http-equiv="refresh" content="5" --> <meta name="Generator" content="OpenLisp Server Page" /> <meta name="robots" content="noindex,follow" /> </head> <body> <p> <?openlisp (require 'datetime) (let ((val (machine-info))) (format (standard-output) "~A on ~A~%" (current-date) (elt val 1))) ?> </p> <p> Openlisp v<?openlisp (prin (version)) ?> Server Page, computes Fib serie: <br /> <br /> <table border = "1" bordercolor = "#000000" cellpadding = "4" cellspacing = "1" > <tbody> <?openlisp ;; nice way to WEB around!!! (require 'cgi) ;; not really needed for this sample (defun fib (n) ;; Standard function with integer argument (cond ((= n 1) 1) ((= n 2) 1) (t (+ (fib (1- n)) (fib (- n 2)))))) (for ((i 1 (1+ i))) ((> i 20)) (format (standard-output) "<tr><td>(fib ~D)</td><td>~D</td></tr>~%" i (fib i))) ?> </tbody> </table> </p> </body> </html>