Christian,
You're quite correct. It would appear that the final act in the continuation is to load the file. Hence the recursive loop. Can't say why though. Maybe a bug perhaps?
Nick Walton
On 11 Jun 2008, at 10:56, Cristian Baboi wrote:
On Wed, 11 Jun 2008 12:50:36 +0300, Nicholas Walton nwalton@mac.com wrote:
I think you've had finger slip somewhere, when I ran the example the results where as expected
I don't know what is expected. If you run the whole file from gambit-c, you'll get what I wrote. If you omit the last line from the file and enter it at the prompt, you don't get the loop. However, the question was about the different results in plt-scheme and gambit-c. I don't know which one is wrong.
Gambit v4.2.2
(define (call/ccc x) (call-with-current-continuation x))
(define coco 1)
(begin (display "begin") (newline) (call/ccc (lambda (c) (set! coco c))) (display "again") (newline) (display "end") (newline) ) begin again end
(coco 13) again end
Nick Walton
________ Information from NOD32 ________ This message was checked by NOD32 Antivirus System for Linux Mail Servers. part000.txt - is OK http://www.eset.com