bayonne-devel
[Top][All Lists]
Advanced

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

Re: [Bayonne-devel] Problems about loop structures


From: Michel Think
Subject: Re: [Bayonne-devel] Problems about loop structures
Date: Thu, 6 Jan 2005 18:29:37 +0100

Hello,

Thanks you all for answering me!

"Bayonne blocked" means that it goes dead...in fact, it didn't
response to anything and the only issue is to make bayonne working
again is  to kill it with "kill" command. Otherwise, in my script i
have hangup, exit, no infinite loops etc...

However, I  removed all loops, and it continues to block. Now my test
script looks like :

set %var 10
set %var1 0

              if %var1 -eq 0
               then
                      

                       if %var -eq 10
                       then
                               slog "xxxx"
                       else
                                slog "yyyy"
                       endif

               else

                               

                       if %var -eq 1
                       then
                                        slog "zzzzz"
                       else
                                        slog "aaaaa"  
                       endif
               endif

goto ::end

^hangup
exit

::end
exit

According to the trace from bayonne - -test, it seems that the first
level 'if'  is mixed up with the second levels 'if'...Here are the
trace :

dummy(0): step 3 set(%var,10)
dummy(0): step 3 set(%var1,0)
dummy(0): step 3 if(%var1,-eq,0)
dummy(0): step 3 if(%var,-eq,10)
dummy(0): step 3 slog(xxxx)
dummy(0): test: xxxx
dummy(0): step 3 else()
dummy(0): step 3 else()
----------------------------------------> Bayonne blocks there

As I am a beginner in Bayonne, It may be a syntax error as well !! 
bye bye
PS : I have :
commonpcpp 1.2.7
ccscript 2.5.7
bayonne 1.2.13 installed on my PC and I work with soundcard.


On Tue, 04 Jan 2005 06:38:41 -0500, David Sugar <address@hidden> wrote:
> In general currently used versions of libccscript do not have automatic
> stack management, hence, if one uses things like gotos or has ^events
> happen within a loop, the interpreter stack frame is not immediately
> recovered unless pop is explicitly used.  The testing branch has
> automatic stack management, where the stack is flattened for a goto or
> event handler regardless of how many frames deep in a loop one is, and
> so it generally does this very well.  Automatic stack management will
> also be part of a future libccscript distribution.
> 
> Dmitry Agafonov wrote:
> > Hello! Happy New Year!
> >
> > I can confirm some strange behaviour with loop structures (1.2.11).
> > It seems that (at least) stack errors occures sometimes - use ^error
> > handler to see what happens.
> > Bayonne interpreter stops, hangs or behave inadequately with goto or
> > other instructions...
> > I mean long-duration calls with hundreds of branch events per single call.
> >
> > So I _do not use_ loop structures in production...
> >
> >
> > Luca Bariani wrote:
> >
> >> Il 16:06, lunedì 3 gennaio 2005, Michel Think ha scritto:
> >>
> >>> (Version : Bayonne 1.2.11)
> >>>
> >>> Hi everyone,
> >>>
> >>> I have met two problems in relation with loop structures...
> >>>
> >>> *** Here is the first one :
> >>>
> >>> I made a script in which I have a 'do...loop' containing
> >>> if-then-else-endif
> >>> and another 'do loop' structures. When I tried it, Bayonne  blocked.
> >>
> >>
> >>
> >> What do you mean with "Bayonne blocked"? can the script have an
> >> infinite loop?
> >>
> >> how do you exit from the main "do .. loop"?
> >>
> >>
> >>
> >>> The script looks like :
> >>>
> >>>       do
> >>>
> >>>               if %var1 -eq 0
> >>>               then
> >>>                       .....
> >>>
> >>>                       if %var2 -eq 1
> >>>                       then
> >>>
> >>>                               ....
> >>>
> >>>                               set %index 1
> >>>
> >>>                               do %index -lt 7
> >>>
> >>>                                       ....
> >>>
> >>>                                       inc %index
> >>>
> >>>                               loop
> >>>
> >>>                       endif
> >>>
> >>>               else
> >>>
> >>>                               .....
> >>>
> >>>                       if %var3 -eq 1
> >>>                       then
> >>>
> >>>                                       .....
> >>>                               set %index 1
> >>>
> >>>                               do %index -lt 7
> >>>
> >>>                                       ...
> >>>                                       inc %index
> >>>
> >>>                               loop
> >>>
> >>>                       endif
> >>>               endif
> >>>
> >>>       loop
> >>> ***************************************************************************
> >>>
> >>> ** *** Here is my second problem :
> >>>
> >>> I have a script which containing a 'repeat...loop' structure and I
> >>> noticed that sometime (not everytime) after the 'hangup' event, it
> >>> continues to repeat...Before hanging up, it repeats the number of time
> >>> we put as parameter in the 'repeat' instruction.
> >>> does anyone notice and has an explanation about this?
> >>
> >>
> >>
> >> what di you di after ^hanguo event?
> >>
> >> have you an exit instruction?
> >>
> >> bye
> >>
> >> Luca
> >>
> >
> >
>




reply via email to

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