Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ogicse!zephyr.ens.tek.com!tekchips!sail!toma From: toma@sail.LABS.TEK.COM (Tom Almy) Newsgroups: comp.lang.lisp.x Subject: This month's XLISP 2.x bug... Message-ID: <8960@sail.LABS.TEK.COM> Date: 13 Feb 91 16:25:02 GMT Reply-To: toma@sail.LABS.TEK.COM (Tom Almy) Organization: Tektronix, Inc., Beaverton, OR. Lines: 23 The latest bug fix for XLISP 2.x: Problem: The environment is not properly restored when a return is executed within a DOLIST or DOTIMES form. Example: (prog ((x 10)) (dotimes (x 10) (return nil)) (print x)) will print "0" Solution: In file xlcont.c, functions xdolist() and xdotimes(), move the lines, /* unbind the arguments */ xlenv = cdr(xlenv); out of the else statement (just before the following "xlend(&cntxt)". -- Tom Almy toma@sail.labs.tek.com Standard Disclaimers Apply