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
its_lisp [2020/04/15 20:25]
smj
its_lisp [2022/05/23 03:10] (current)
ldbeth
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** +The biggest difference between Multics Maclisp is PDP-10 version does not have "real" string data type, the PDP-10 Maclisp string is just a symbol with a special property been set. The good news is the ''format'' pretty printer function is still available to build strings with complex contents. 
-//;tnx1.0e6 to GLS// + 
- +**A sample MACLISP session on ITS using LEDIT MODE in EMACS** 
 +//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 53:
  
 //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.1586982346.txt.gz · Last modified: 2020/04/15 20:25 by smj