bayonne-devel
[Top][All Lists]
Advanced

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

Re: [Bayonne-devel] problems with loopable script


From: Etoile Dièse
Subject: Re: [Bayonne-devel] problems with loopable script
Date: Fri, 17 Jun 2005 11:18:45 +0200
User-agent: Opera M2/8.0 (Win32, build 7561)

Le Thu, 16 Jun 2005 17:31:55 +0200, David Sugar <address@hidden> 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





reply via email to

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