International Allegro CL Free Express Edition 8.1 [Windows] (May 6, 2009 10:11) Copyright (C) 1985-2007, Franz Inc., Oakland, CA, USA. All Rights Reserved. This development copy of Allegro CL is licensed to: Trial User CG version 1.103.2.29 / IDE version 1.103.2.26 Loaded options from C:\Users\dan\Documents\allegro-prefs-8-1-express.cl. ;; Optimization settings: safety 1, space 1, speed 1, debug 2. ;; For a complete description of all compiler switches given the current optimization settings evaluate ;; (EXPLAIN-COMPILER-SETTINGS). [changing package from "COMMON-LISP-USER" to "COMMON-GRAPHICS-USER"] CG-USER(1): (seta a 1) Error: attempt to call `SETA' which is an undefined function. [condition type: UNDEFINED-FUNCTION] CG-USER(2): (setq a 1) 1 CG-USER(3): (incf a) 2 CG-USER(4): a 2 CG-USER(5): (abs #c(3 -4)) 5.0 CG-USER(6): (setq x '(a b c) y (cdr x)) (B C) CG-USER(7): (member 3 '(1 2 3 4 5) :test #'<) (4 5) CG-USER(8): The screen resolution has just changed to width 1024 height 768 and depth 32. The IDE tool windows are being automatically moved and resized to where they were when you last saved preferences at this resolution (or else to their default positions and sizes for this resolution). See ide:move-ide-windows-on-screen-resize . CG-USER(8): (setq x '(a b c)) (A B C) CG-USER(9): (setq y '(1 2 3)) (1 2 3) CG-USER(10): (append x y) (A B C 1 2 3) CG-USER(11): x (A B C) CG-USER(12): y (1 2 3) CG-USER(13): (+ #c(1 2) #c(2 3)) #C(3 5) CG-USER(14): (* 1/2 2/3) 1/3 CG-USER(15): 3/2 3/2 CG-USER(16): (+ 3/2 0.0) 1.5 CG-USER(17): (float 3/2) 1.5 CG-USER(18): (floor 2.9) 2 0.9000001 CG-USER(19): (+ (floor 2.9) 5) 7 CG-USER(20): (values (floor 2.9)) 2 CG-USER(21): (setq x 3) 3 CG-USER(22): (incf x) 4 CG-USER(23): x 4 CG-USER(24): (1+ x) 5 CG-USER(25): x 4 CG-USER(26): (abs #c(3 -4)) 5.0 CG-USER(27): (conjugate (complex 1 2)) #C(1 -2) CG-USER(28): (atom 'a) T CG-USER(29): (atom 33) ) CG-USER(29): CG-USER(29): (atom 33) T CG-USER(30): (atom 'alpha) T CG-USER(31): (atom nil) T CG-USER(32): (atom '()) T CG-USER(33): (atom '(a d 6)) NIL CG-USER(34): (integerp 'a) NIL CG-USER(35): (integerp 33) T CG-USER(36): (integer 'a) Error: attempt to call `INTEGER' which is an undefined function. [condition type: UNDEFINED-FUNCTION] CG-USER(37): (floor 3.0) 3 0.0 CG-USER(38): (floor 'a) Error: `A' is not of the expected type `NUMBER' [condition type: TYPE-ERROR] CG-USER(39): (eq 1 1) T CG-USER(40): (eq 2.5 2.5) NIL CG-USER(41): (eql 2.5 2.5) T CG-USER(42): (equal '(a b c) '(a b c)) T CG-USER(43): (eql '(a b c) '(a b c)) NIL CG-USER(44): (setq m '(a b c)) (A B C) CG-USER(45): (eql m m) T CG-USER(46): (equal m m) CG-USER(46): (equal m m) T CG-USER(47): (boundp zeta) Error: Attempt to take the value of the unbound variable `ZETA'. [condition type: UNBOUND-VARIABLE] CG-USER(48): (boundp 'zeta) NIL CG-USER(49): (setq zeta 'alpha) ALPHA CG-USER(50): (boundp zeta) NIL CG-USER(51): alpha Error: Attempt to take the value of the unbound variable `ALPHA'. [condition type: UNBOUND-VARIABLE] CG-USER(52): (boundp 'zeta) T CG-USER(53): (equal 'alpha 'alpha) T CG-USER(54): (eql 'alpha 'alpha) T CG-USER(55): (equal '(a b c) (cons 'a (cons 'b (cons 'c nil)))) T CG-USER(56): (eql '(a b c) (cons 'a (cons 'b (cons 'c nil)))) NIL CG-USER(57): (eq 1 1) T CG-USER(58): (member 'alpha '(a alpha b alpha)) (ALPHA B ALPHA) CG-USER(59): (member '(1 2 3) '(a (1 2 3) b (2 3 4) c)) NIL CG-USER(60): (member '(1 2 3) '(a (1 2 3) b (2 3 4) c) :test #'equal) ((1 2 3) B (2 3 4) C) CG-USER(61): (member '2 '(1 2 3 4 5) :test #'<) (3 4 5) CG-USER(62): (member '2 '(1 2 3 4 5 1) :test #'<) (3 4 5 1) CG-USER(63): (union '(a b c d) '(1 a 2 b 3)) (D C 1 A 2 B 3) CG-USER(64): (intersection '(a b c d) '(1 a 2 b 3)) (B A) CG-USER(65): (intersection '(a b c d) '((1) (a b c) (2 z) (z x) (3 3 t)) :test #'(lambda(x y) (eql x (car y)))) (B A) CG-USER(66): (intersection '(a b c d) '((1) (a b c) (d z) (a x) (3 3 t)) :test #'(lambda(x y) (eql x (car y)))) (A) CG-USER(67): (intersection '(a b c d) '((1) (a b c) (d z) (a x) (3 3 t)) :test #'(lambda(x y) (eql x (car y)))) (D A) CG-USER(68): The screen resolution has just changed to width 1024 height 768 and depth 32. The IDE tool windows are being automatically moved and resized to where they were when you last saved preferences at this resolution (or else to their default positions and sizes for this resolution). See ide:move-ide-windows-on-screen-resize . CG-USER(68): The screen resolution has just changed to width 1024 height 768 and depth 32. The IDE tool windows are being automatically moved and resized to where they were when you last saved preferences at this resolution (or else to their default positions and sizes for this resolution). See ide:move-ide-windows-on-screen-resize . CG-USER(68): (not 1) NIL CG-USER(69): (not nil) T CG-USER(70): (and (setq ma '1) (setq ta 0) (setq na nil) (setq ma 3)) NIL CG-USER(71): ma 1 CG-USER(72): (setq n 7) 7 CG-USER(73): (and (not (zerop n)) (/ 1 n)) 1/7 CG-USER(74): (setq n 0) 0 CG-USER(75): (and (not (zerop n)) (/ 1 n)) NIL CG-USER(76): (or (not (zerop n)) (/ 1 n)) Error: Attempt to divide 1 by zero. [condition type: DIVISION-BY-ZERO] CG-USER(77): (if (setq s nil) 3 4) 4 CG-USER(78): (if (zerop (setq n 0)) 33 (/ 1 n)) 33 CG-USER(79): (cond ((setq x t) "unu") ((setq x t) "doi") (t "trei")) "unu" CG-USER(80): (cond ((setq x nil) "unu") ((setq x t) "doi") (t "trei")) "doi" CG-USER(81): (cond ((setq x nil) "unu") ((setq x nil) "doi") (t "trei")) "trei" CG-USER(82): (setq (cons a b)) Error: Setq with odd number of args. [condition type: PROGRAM-ERROR] CG-USER(83): (sets x (cons 'a 'b)) Error: attempt to call `SETS' which is an undefined function. [condition type: UNDEFINED-FUNCTION] CG-USER(84): (setq x (cons 'a 'b)) (A . B) CG-USER(85): x (A . B) CG-USER(86): (car x) A CG-USER(87): (cdr x) B CG-USER(88): (setq las (list (cons 'a 1) (cons 'b 2) (cons 'c 3) (cons 'a 4))) ((A . 1) (B . 2) (C . 3) (A . 4)) CG-USER(89): (assoc 'b las) (B . 2) CG-USER(90): (assoc 'a las) (A . 1) CG-USER(91): (assoc 'a (cdr las)) (A . 4) CG-USER(92): (pairlis (list 'a 'b 'c) (list 1 2 3)) ((C . 3) (B . 2) (A . 1)) CG-USER(93): (rassoc 4 las) (A . 4) CG-USER(94): (rassoc 2 las :test #'<) (C . 3) CG-USER(95): (setq l '(a b c)) (A B C) CG-USER(96): (setf (car l) 1 (cadr l) 'beta) BETA CG-USER(97): l (1 BETA C) CG-USER(98): The screen resolution has just changed to width 1024 height 768 and depth 32. The IDE tool windows are being automatically moved and resized to where they were when you last saved preferences at this resolution (or else to their default positions and sizes for this resolution). See ide:move-ide-windows-on-screen-resize . CG-USER(98): The screen resolution has just changed to width 1024 height 768 and depth 32. The IDE tool windows are being automatically moved and resized to where they were when you last saved preferences at this resolution (or else to their default positions and sizes for this resolution). See ide:move-ide-windows-on-screen-resize . CG-USER(98): (setf (get 'a 'p1) 'v1) V1 CG-USER(99): (get 'a 'p1) V1 CG-USER(100): (setf (get 'a 'p2) 'v2) V2 CG-USER(101): (plist 'a) (P2 V2 P1 V1) CG-USER(102): (setf (get 'a 'p1) 'v3) V3 CG-USER(103): (plist 'a) (P2 V2 P1 V3) CG-USER(104): (setq l1 '(a b c) l2 (1 2 3)) Error: Funcall of 1 which is a non-function. [condition type: TYPE-ERROR] CG-USER(105): (setq l1 '(a b c) l2 '(1 2 3)) (1 2 3) CG-USER(106): l1 (A B C) CG-USER(107): l2 (1 2 3) CG-USER(108): (append l1 l2) (A B C 1 2 3) CG-USER(109): l1 (A B C) CG-USER(110): l2 (1 2 3) CG-USER(111): (nconc l1 l2) (A B C 1 2 3) CG-USER(112): l1 (A B C 1 2 3) CG-USER(113): l2 (1 2 3) CG-USER(114): (rplacd (cdr l1) 'beta) (B . BETA) CG-USER(115): l1 (A B . BETA) CG-USER(116): (setq l1 '(a b c) l2 '(1 2 3)) (1 2 3) CG-USER(117): (nconc l1 l2) (A B C 1 2 3) CG-USER(118): (rplaca (cdr l1) 'beta) (BETA C 1 2 3) CG-USER(119): l1 (A BETA C 1 2 3) CG-USER(120): (setq f '+) + CG-USER(121): (apply f '(1 2 3)) 6 CG-USER(122): (apply #'min (2 4 1 5 8)) Error: Funcall of 2 which is a non-function. [condition type: TYPE-ERROR] CG-USER(123): (apply #'min '(2 4 1 5 8)) 1 CG-USER(124): (min 2 4 1 4 6) 1 CG-USER(125): (setq x 2) 2 CG-USER(126): (apply (if (> x 1) #'min #'max) '(1 2 3 4 5 6)) 1 CG-USER(127): (setq x 1) 1 CG-USER(128): (apply (if (> x 1) #'min #'max) '(1 2 3 4 5 6)) 6 CG-USER(129): (funcall #'min 2 4 1 5 8) 1 CG-USER(130): l1 (A BETA C 1 2 3) CG-USER(131): (setq l '(1 2 3 4 5 6 7)) (1 2 3 4 5 6 7) CG-USER(132): (min l) Error: `(1 2 3 4 5 6 7)' is not of the expected type `NUMBER' [condition type: TYPE-ERROR] CG-USER(133): (apply #'min l) 1 CG-USER(134): ((lambda (x) (min x)) 1 2 3 4 5) Error: (:INTERNAL NIL) got 5 args, wanted 1 arg. [condition type: PROGRAM-ERROR] CG-USER(135): (apply #'(lambda (x) (min x)) '(1 2 3 4 5)) Error: # got 5 args, wanted 1 arg. [condition type: PROGRAM-ERROR] CG-USER(136): (apply #'(lambda (x) (min x)) 1 2 3 4 5) Error: Expected a true list but got dotted or circular list 5. [condition type: SIMPLE-ERROR] CG-USER(137): (apply #'+ (mapcar #'(lambda (x y) (* x y)) '(1 2 3 4) '(10 20 30 40))) 300 CG-USER(138): (mapcar #'(lambda (x) (car x)) '((a b) (1 2 3) (aa bb zz))) (A 1 AA) CG-USER(139): (mapcar #'(lambda (x y) (* x y)) '(1 2 3 4) '(10 20 30 40)) (10 40 90 160) CG-USER(140): (apply #'(lambda (x) (car x)) '((a b) (1 2 3) (aa bb zz))) Error: # got 3 args, wanted 1 arg. [condition type: PROGRAM-ERROR] CG-USER(141): (apply #'(lambda (x) (car x)) '((a b) (1 2 3) (aa bb zz))) A CG-USER(142): '((a b) (1 2 3) (aa bb zz)) ((A B) (1 2 3) (AA BB ZZ)) CG-USER(143): (car '((a b) (1 2 3) (aa bb zz))) (A B) CG-USER(144): (setq l '(1 2 3 4 5 6 7)) (1 2 3 4 5 6 7) CG-USER(145): (apply #'(lambda (x) (car x)) '(((a b) (1 2 3) (aa bb zz)))) (A B) CG-USER(146): (car 2 3 4) Error: CAR got 3 args, wanted 1 arg. [condition type: PROGRAM-ERROR] CG-USER(147): (car (a b) (1 2 3) (aa bb zz)) Error: attempt to call `A' which is an undefined function. [condition type: UNDEFINED-FUNCTION] CG-USER(148): maplist #'(lambda (x) x) '(1 2 3 4)) CG-USER(148): (maplist #'(lambda (x) x) '(1 2 3 4)) ((1 2 3 4) (2 3 4) (3 4) (4)) CG-USER(149): (mapcar #'(lambda (x) (cons 'alpha x)) (maplist #'(lambda (x) x) '(1 2 3 4))) ((ALPHA 1 2 3 4) (ALPHA 2 3 4) (ALPHA 3 4) (ALPHA 4)) CG-USER(150): CG-USER(150): (mapcar #'(lambda (x) (apply #'+ x)) (maplist #'(lambda (x) x) '(1 2 3 4))) (10 9 7 4) CG-USER(151): CG-USER(151): (setq l (pairlis '(Mihai Gheorghe Nicolae Ion) '(Misu Ghita Nicu Ionica))) ((ION . IONICA) (NICOLAE . NICU) (GHEORGHE . GHITA) (MIHAI . MISU)) CG-USER(152): (mapcar #'(lambda(x) (if (null (assoc x l)) x (cdr (assoc x l)))) '(Mihai s-a intilnit Mircea ca sa-l viziteze impreuna pe Ion)) (MISU S-A INTILNIT CU MIRCEA CA SA-L VIZITEZE IMPREUNA PE ...) CG-USER(153): CG-USER(153): (mapcar #'(lambda(x) (if (null (assoc x l)) x (cdr (assoc x l)))) '(Mihai s-a intilnit Mircea ca sa-l viziteze impreuna pe Ion)) (MISU S-A INTILNIT MIRCEA CA SA-L VIZITEZE IMPREUNA PE IONICA) CG-USER(154): l ((ION . IONICA) (NICOLAE . NICU) (GHEORGHE . GHITA) (MIHAI . MISU)) CG-USER(155): (assoc 'ion l) (ION . IONICA) CG-USER(156): (assoc 'mircea l) NIL CG-USER(157): (defun f1 () (princ "mes 1") (defun f2 () (princ "mes 2")) (princ "mes 3")) F1 CG-USER(158): (f2) Error: attempt to call `F2' which is an undefined function. [condition type: UNDEFINED-FUNCTION] CG-USER(159): (f1) mes 1mes 3 "mes 3" CG-USER(160): (f2) mes 2 "mes 2" CG-USER(161): (f2) mes 2 "mes 2" CG-USER(162): (f1) mes 1mes 3 "mes 3" CG-USER(163): (defun fact (n) (if (zerop n) 1 (* n (fact (- n 1))))) FACT CG-USER(164): (fact 6) 720 CG-USER(165): (fact 1000) 402387260077093773543702433923003985719374864210714632543799910429938512398629020592044208486969404800479988610197196058631666872994808558901323829669944590997424504087073759918823627727188732519779505950995276120874975462497043601418278094646496291056393887437886487337119181045825783647849977012476632889835955735432513185323958463075557409114262417474349347553428646576611667797396668820291207379143853719588249808126867838374559731746136085379534524221586593201928090878297308431392844403281231558611036976801357304216168747609675871348312025478589320767169132448426236131412508780208000261683151027341827977704784635868170164365024153691398281264810213092761244896359928705114964975419909342221566832572080821333186116811553615836546984046708975602900950537616475847728421889679646244945160765353408198901385442487984959953319101723355556602139450399736280750137837615307127761926849034352625200015888535147331611702103968175921510907788019393178114194545257223865541461062892187960223838971476088506276862967146674697562911234082439208160153780889893964518263243671616762179168909779911903754031274622289988005195444414282012187361745992642956581746628302955570299024324153181617210465832036786906117260158783520751516284225540265170483304226143974286933061690897968482590125458327168226458066526769958652682272807075781391858178889652208164348344825993266043367660176999612831860788386150279465955131156552036093988180612138558600301435694527224206344631797460594682573103790084024432438465657245014402821885252470935190620929023136493273497565513958720559654228749774011413346962715422845862377387538230483865688976461927383814900140767310446640259899490222221765904339901886018566526485061799702356193897017860040811889729918311021171229845901641921068884387121855646124960798722908519296819372388642614839657382291123125024186649353143970137428531926649875337218940694281434118520158014123344828015051399694290153483077644569099073152433278288269864602789864321139083506217095002597389863554277196742822248757586765752344220207573630569498825087968928162753848863396909959826280956121450994871701244516461260379029309120889086942028510640182154399457156805941872748998094254742173582401063677404595741785160829230135358081840096996372524230560855903700624271243416909004153690105933983835777939410970027753472000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 CG-USER(166): (defun fact (n ac) (if (zerop n) 1 (fact (- n 1) (* ac n)))) FACT CG-USER(167): (fact 6) Error: FACT got 1 arg, wanted 2 args. [condition type: PROGRAM-ERROR] CG-USER(168): (fact 6 1) 1 CG-USER(169): (defun fact (n ac) (if (zerop n) ac (fact (- n 1) (* ac n)))) FACT CG-USER(170): (fact 6 1) 720 CG-USER(171): (defun lung-1 (l ac) (if (null l) ac (lung-1 (cdr l) (1+ ac)))) LUNG-1 CG-USER(172): (lung-1 '(1 2 3 4 5 6 7 8 9 0) 0) 10 CG-USER(173): (let ((x 'a)(y 'b)) (prin1 x) (prin1 y) (let ((x y)(y x)) (prin1 x) (prin1 y))) ABBA A CG-USER(174): CG-USER(174): (let ((x 'a)(y 'b)) (prin1 x) (prin1 y) (let ((x y)(y x)) (prin1 x) (prin1 y)) (prin1 x) (prin1 y)) ABBAAB B CG-USER(175): The screen resolution has just changed to width 1024 height 768 and depth 32. The IDE tool windows are being automatically moved and resized to where they were when you last saved preferences at this resolution (or else to their default positions and sizes for this resolution). See ide:move-ide-windows-on-screen-resize . CG-USER(175): The screen resolution has just changed to width 1024 height 768 and depth 32. The IDE tool windows are being automatically moved and resized to where they were when you last saved preferences at this resolution (or else to their default positions and sizes for this resolution). See ide:move-ide-windows-on-screen-resize . CG-USER(175):