Scheme bug in internal define

From: Keith Wright <kwright_at_tiac.net>
Date: Sat, 8 Nov 97 14:57 EST

The following program exhibits a bug in both STk and Guile.
(Somebody ought to try it on SCM.)
One would expect it either to print "good" twice, or
to display an error message. In fact it prints "good"
and then "bad". MIT scheme prints "good" twice.
I have STk-3.1 and guile-core-971005.

(define (bug)
  (define good "good")
  (define bad "bad")
  (define (do-good) (display good)(newline))
  (do-good)
  (define ugly #f)
  (do-good))
(bug)

-- 
     --Keith
This mail message sent by GNU emacs and Linux.
Power to the people. Linux is here.
Food, Shelter, Source code.
Received on Sat Nov 08 1997 - 23:06:53 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST