The Lisp Programming Language
Conversions: Example Program of Celsius to Fahrenheit
Click below to go directly to a specific section:
Source Code |
Sample Run |
This program demostrates a fairly simple coversion implemented in LISP. Each time the program (CONVERT) is called it asks the user for any Fahrenheit degree, then displays the equivelant Celsius degree for the user.
;;; This function, given a specific degree in Farhrenheit,
;;; presents the user with equivalent Celsius degree.
(defun convert ()
(format t "Enter Fahrenheit ")
(SETQ fahr (read fahr))
(APPEND '(celsisus is) (*(- fahr 32)(/ 5 9)) )
- This program was created by, The Computer Language Company Inc., All rights reserved, Copyright © 1981-1999. http://www.techweb.com/encyclopedia/defineterm?term=lisp
- Then tested and run using the XLISP-STAT Release 3 compiler. Copyright (c) 1989-1999, by Luke Tierney.
Last modified: 2:40 AM on 10/4/1999 by Christopher Williams