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: David Sugar
Subject: Re: [Bayonne-devel] problems with loopable script
Date: Fri, 17 Jun 2005 07:53:58 -0400
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

And thats why I made it all automatic in ccscript3 :). I believe there is a simple define that controls the number of stack entries in bayonne.h. There might also be a pop.clear, which you could use instead at the top of the loop...

Etoile Dièse wrote:
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.


Attachment: dyfet.vcf
Description: Vcard


reply via email to

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