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

Benoit Minisini gambas at ...1...
Wed Dec 14 23:40:15 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 confirm that this is a bug! The SHELL/EXEC...TO instruction is implemented 
differently from the normal SHELL/EXEC one, and it does not work correctly...

I will look at that problem.

Regards,

-- 
Benoit Minisini





More information about the User mailing list