[Gambas-user] explain to the stupid (me), please

Benoit Minisini gambas at ...1...
Thu Dec 15 00:23:25 CET 2005


On Wednesday 14 December 2005 20:50, Stefano Palmeri wrote:
> Hi all. Hi Benoit.
>
> This code freezes Gambas2 (1.9.20)...
>
> PUBLIC SUB Main()
>
>    DIM shellout AS String
>
>    SHELL "echo Gambas is great!" WAIT
>    SHELL "date" TO shellout
>
>    PRINT shellout
>
> END
>
> It  executes the first SHELL command, but freezes on the second SHELL.
>
> I experienced that:
>
> if there's one "SHELL ... WAIT" before "SHELL ... TO" the program freezes,
> (in fact if I remove the first SHELL, then I get the date).
>
> If there's another "SHELL ... TO" before "SHELL ... TO", things work fine,
>
> If there's another command (not SHELL) before "SHELL ... TO",  things work
> fine.
>
> I already know that there's a well known explanation for this
> and I'm a stupid :-( , but I didn't find it around... So, excuse me.
>
> Please,  could someone explain to me why I can't put a "SHELL...WAIT"
> before a "SHELL...TO"?
>
> Saluti,
>
> Stefano
>

I found the bug! This was a stupid one - Just one character to change in the 
source code :-)

The bug exists in both stable and development version.

Here is some patches for you, and those who need...

-- 
Benoit Minisini
-------------- next part --------------
A non-text attachment was scrubbed...
Name: (development) gbx_watch.c
Type: text/x-csrc
Size: 9292 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20051215/b8941eca/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: (stable) gbx_watch.c
Type: text/x-csrc
Size: 4906 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20051215/b8941eca/attachment-0001.c>


More information about the User mailing list