chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Difference in behaviour with code compiled with csc and


From: Joe Python
Subject: [Chicken-users] Difference in behaviour with code compiled with csc and code run with csi.
Date: Sat, 6 Dec 2014 20:34:48 -0500



I was experimenting with a coroutine example which i got from the c2 website. see link below for code.

http://paste.call-cc.org/paste?id=cf4489b9de4820b330dc34371ea3b73a18115a4b#a0

I get the expected output when I run the code using csi

$ csi -ns coroutines.scm
HELLO!
WORLD!


However when i run the executable which i compiled with csc, i get the following unexpected output. Please let me know what I am doing wrong.

$ csc coroutines.scm
$ ./coroutines
HELLO!
WORLD!
SORRY, I'M OUT

Error: dead-coroutine

    Call history:

    coroutines.scm:32: yield     
    coroutines.scm:15: call/cc     
    coroutines.scm:16: return     
    coroutines.scm:39: test-coroutine-1     
    coroutines.scm:12: call/cc     
    coroutines.scm:17: current     
    coroutines.scm:33: display     
    coroutines.scm:34: yield     
    coroutines.scm:15: call/cc     
    coroutines.scm:16: return     
    coroutines.scm:39: test-coroutine-1     
    coroutines.scm:12: call/cc     
    coroutines.scm:17: current     
    coroutines.scm:35: display     
    coroutines.scm:39: test-coroutine-1     
    coroutines.scm:10: error          <--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]