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

Stefano Palmeri rospolosco at ...152...
Wed Dec 14 20:50:04 CET 2005


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 





More information about the User mailing list