Re: problems with loopable script
Etoile Dièse <[email protected]>
| Newsgroups | gmane.comp.gnu.bayonne.devel |
|---|---|
| Organization | EtoileDièse |
| Message-ID | <op.ssib5jm9e8721e@m6bn> |
Le Thu, 16 Jun 2005 17:31:55 +0200, David Sugar <[email protected]> a écrit: > The "pop" command removes one stack level. If you have a ^xxx handler > that catches an event, and then reruns the script or does a goto to > another script, the stack is unchanged. If you happen to be inside a > for-loop, and a ^xxx handler like that is triggered, you have an extra > stack frame that is not recovered when the script reloops or you branch. > If this happens repeatidly during the call, you will eventually > use up the runtime stack (20 entries). The pop command in the ^xxx > handler can be used to manually get rid of the extra stack frame. All > this happens automatically in ccscript3. > Wouldn't it be possible to increase this stack size ? (I agree, this would be a temporary fix) Determining whether a handler interrupted a loop or not is adding complexity : Imagine the following block : ::myBlock ... Intructions ... for ... loop ... Instructions ... ^event # Should I "pop" ? I guess the "pop" command should be issued only when the handler is triggered while beeing in the loop... F. -- Etoile Dièse - www.etoilediese.com