PC-LISP
Encyclopedia
PC-LISP is an implementation of the Franz Lisp
Franz Lisp
In computer programming, Franz Lisp was a Lisp system written at UC Berkeley by the students of Professor Richard J. Fateman, based largely on Maclisp and distributed with the Berkeley Software Distribution for the Digital Equipment Corp VAX...

 dialect for DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

 by Peter Ashwood-Smith.

Version 2.11 was released on May 15, 1986. It can still be found on old abandonware
Abandonware
Abandonware are discontinued products for which no product support is available, or whose copyright ownership may be unclear for various reasons...

 and shareware
Shareware
The term shareware is a proprietary software that is provided to users without payment on a trial basis and is often limited by any combination of functionality, availability, or convenience. Shareware is often offered as a download from an Internet website or as a compact disc included with a...

 download sites.

Ashwood-Smith says of his interpreter: "PC-LISP is a small implementation of LISP for ANY MS-DOS machine. While small, it is capable of running a pretty good subset of Franz LISP."

Note that the Franz LISP dialect was the immediate, portable successor to the ITS
ITS
its, it's or ITS can mean:* it's, a contraction of it is or it has* its, the possessive adjective and possessive pronoun form of the personal pronoun it- Computing :...

 version of Maclisp
Maclisp
MACLISP is a dialect of the Lisp programming language. It originated at MIT's Project MAC in the late 1960s and was based on Lisp 1.5. Richard Greenblatt was the main developer of the original codebase for the PDP-6; Jonl White was responsible for its later maintenance and development...

 and is perhaps the closest thing to the LISP in the Steven Levy
Steven Levy
Steven Levy is an American journalist who has written several books on computers, technology, cryptography, the Internet, cybersecurity, and privacy.-Career:...

 book Hackers
Hackers: Heroes of the Computer Revolution
Hackers: Heroes of the Computer Revolution is a book by Steven Levy about hacker culture. It was published in 1984 in Garden City, New York by Anchor Press/Doubleday...

as is practical to operate. PC-LISP runs well in DOS emulators and on modern Windows versions. Because PC-LISP implements Franz LISP, it is a dynamically scoped predecessor to modern Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

. This is therefore an historically important implementation.

Example

The session is running the following code which demonstrates dynamic scoping in Franz LISP. Note that PC-LISP does not implement the let special form that Emacs Lisp
Emacs Lisp
Emacs Lisp is a dialect of the Lisp programming language used by the GNU Emacs and XEmacs text editors . It is used for implementing most of the editing functionality built into Emacs, the remainder being written in C...

 provides for local variables. Instead, all variables are what an ALGOL
ALGOL
ALGOL is a family of imperative computer programming languages originally developed in the mid 1950s which greatly influenced many other languages and became the de facto way algorithms were described in textbooks and academic works for almost the next 30 years...

-based language would call "global". The first dialect of Lisp to incorporate ALGOL scoping rules (called lexical scoping) was Scheme although the Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

language also added this feature.
Demonstration of dynamic scopin

This is a "global" variabl

(setq myglobal "this is my global variable")
Another global variabl

(setq yourglobal "this is my global variable")
a function which prints the symbol

(defun dosomething (mine yours)
(princ " * Mine is - ")
(princ mine)
(princ "\n")
(princ " * Yours is - ")
(princ yours)
(princ "\n"))
override the symbol

(defun nolocals
(setq mine "I have set mine to a new value")
(setq yours "I have set mine to a new value")
(dosomething mine yours))

(defun main
;; define two symbols
(setq mine myglobal)
(setq yours yourglobal)

;; print them
(princ "calling dosomething\n")
(dosomething mine yours)
(princ "calling nolocals\n")
(nolocals)
(princ "calling dosomething again\n")
(dosomething mine yours))

External links

  • List of files which includes: "PCLISP.ZIP 62745 02-23-86 a near franz lisp (with documentation)"
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK