<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Please shoot this down, if it is incorrect. (no details necessary, just a yes,no is sufficient)<br><br>In the <a target="_blank" href="http://www.mirandabanda.org/cogblog/category/cog/page/14/">discussion </a>on the re-entrant problem for BlockContexts regarding this code:<br><br><font face="serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | factorial |<br>         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;factorial := [:n| n = 1 ifTrue: [1] ifFalse: [(factorial value: n - 1) * n]].<br>         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(1 to: 10) collect: factorial</font><br><br>This statement: "The block can’t be reentered without overwriting the sender field, preventing return to the first caller. "<br><br>Does <b>not</b> mean that the bock is reentered, the sender field is over-written and when we get to n=10 stage things go kablooie.<br>What happens is the coders detect this condition and the primitive code&nbsp; will <b>not allow</b>  a sender to be over-written. <br>The error that is thrown is <b>purposeful and defensive</b><br><br>I don't know what I am looking at yet, but I think that error check happens here:<br><br>Interpreter &gt;&gt; primitiveValueWithArgs<br>&nbsp;&nbsp;&nbsp; | argumentArray blockContext blockArgumentCount arrayArgumentCount initialIP |<br>&nbsp;&nbsp;&nbsp; argumentArray _ self popStack.<br>&nbsp;&nbsp;&nbsp; blockContext _ self popStack.<br>&nbsp;&nbsp;&nbsp; blockArgumentCount _ self argumentCountOfBlock: blockContext.<br><b>&nbsp;&nbsp;&nbsp; "If the argArray isnt actually an Array we ahve to unpop the above two"<br>&nbsp;&nbsp;&nbsp; (self isArray: argumentArray) ifFalse: [self unPop:2. ^self primitiveFail].<br></b>.....<br><br><br>Sound about right?<br><br>thx.<br><br>tty<br></div></body></html>