User Tools

Site Tools


its_lisp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
its_lisp [2020/04/15 20:25]
smj
its_lisp [2020/04/16 05:30]
lars Fix markup.
Line 3: Line 3:
 The ITS Lisp is called Maclisp, or PDP-10 Maclisp if necessary to disambiguate it against [[Multics Maclisp]].  Its direct ancestor is [[its_pdp6_lisp|PDP-6 LISP]]. The ITS Lisp is called Maclisp, or PDP-10 Maclisp if necessary to disambiguate it against [[Multics Maclisp]].  Its direct ancestor is [[its_pdp6_lisp|PDP-6 LISP]].
  
-**A sample MACLISP session using LEDIT MODE in EMACS** +**A sample MACLISP session on ITS using LEDIT MODE in EMACS** 
-//;tnx1.0e6 to GLS// +//LEDIT will work on both [[its_topics|ITS]] and [[TOPS-20]] ;tnx1.0e6 to GLS// 
- +      
       KA ITS 1648 DDT 1547 TTY 52               ;System herald       KA ITS 1648 DDT 1547 TTY 52               ;System herald
              
Line 51: Line 51:
  
 //The LISP ... Editor ... LISP ... loop will no doubt be repeated many times.// //The LISP ... Editor ... LISP ... loop will no doubt be repeated many times.//
 +
 +**HELLO WORLD and LOOP examples**
 +
 +     @maclisp                        ; start MACLISP at the TOPS-20 EXEC
 +     
 +     LISP 2122                       ; MACLISP Version 2122
 +     Alloc? n                        ; take the defaults
 +     
 +     
 +     
 +     (defun HELLO ()                 ; DEFINE FUNCTION "HELLO"
 +     (princ "Hello World!"))         ; print characters "Hello World!"
 +     HELLO                           ; MACLISP reports a definition for the function "HELLO"
 +     (hello)Hello World!             ; The function "HELLO" is called and "Hello World!" is printed
 +                                   ; MACLISP reports T for a successful function call
 +
 +     @maclisp
 +     
 +     LISP 2122
 +     Alloc? n
 +     
 +     
 +     *
 +     (loop for x in '(a b c d e)     ; Call the macro "LOOP" for VARIABLE "x" in a list of "a b c d e"
 +     do (print x))                   ; DO a PRINT of the value of "x"
 +     ;Loading LOOP 725               ; MACLISP loads LOOP version 725
 +     ;Loading DEFMAX 98              ; MACLISP loads DEFMAX version 98
 +                                   ; 1. X = A
 +                                   ; 2. X = B
 +                                   ; 3. X = C
 +                                   ; 4. X = D
 +                                   ; 5. X = E 
 +     NIL                             ; DO called PRINT X which returned NIL because there was nothing
 +                                     ; left to PRINT in the list of "a b c d e"
 +
 +**MATH examples**
 +
 +     @maclisp
 +     
 +     LISP 2122
 +     Alloc? n
 +     
 +     
 +         
 +     (+ 2 2)
 +     4
 +     (- 2 2)
 +     0
 +     (* 2 2)
 +     4
its_lisp.txt · Last modified: 2022/05/23 03:10 by ldbeth