More problems from ANSI tests
JP Massar <[email protected]> Thu, 20 Mar 2003 15:54:46 -0800
| Newsgroups | gmane.lisp.corman |
|---|---|
| Message-ID | <[email protected]> |
;;; SETF DOES NOT OBEY LEFT-TO-RIGHT SEMANTICS
(defun setf-bug ()
(let ((x (vector 1 2 3)))
(setf (aref x (progn (print 'first) 0)) (progn (print 'second) 4))
(aref x 0)))
;;; Corman:
(setf-bug)
SECOND
FIRST 4
;;; Allegro:
CG-USER(2): (setf-bug)
FIRST
SECOND
4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; CANNOT SETF INTO A MACROLET'ed MACRO
(defun macrolet-setf-bug ()
(macrolet ((foo (y) `(car ,y)))
(let ((x (list 1)))
(values (setf (foo x) 2) (1+ (car x))))))
;;; An error occurred in function MACROEXPAND:
;;; Error: There is no SETF expansion method defined for (FOO X)
(defmacro bar (y) `(car ,y))
(defun defmacro-setf-ok ()
(let ((x (list 1)))
(values (setf (bar x) 2) (1+ (car x)))))
;;; PSETQ DOES NOT RETURN NIL WHEN GIVEN A SINGLE SYMBOL-VALUE PAIR.
(psetq x 1)
1
(psetq x 1 y 2)
nil
;;; RETURN-FROM NIL doesn't exit to BLOCK NIL
(block nil (block foo (return 'good)) 'bad)
BAD
(block nil (block foo (return-from nil 'good)) 'bad)
BAD
(block :nil (block foo (return-from :nil 'good)) 'bad)
GOOD
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/SyjtlB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
[email protected]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/