[Gambas-devel] Release of gambas2 1.9.10

Benoit Minisini gambas at ...1...
Fri Jul 1 16:48:19 CEST 2005


On Tuesday 28 June 2005 12:30, Daniel Campos wrote:
> The new EXEC is a bit ambiguous for me:
>
> Dim hProc As Process
>
> hProc=EXEC[command]
>
> Execution --> Error: wanted Process, got String
>
> hProc=EXEC[command] FOR WRITE
>
> Execution --> OK
>
>
> Then, must I specify at least "FOR WRITE" if I want to recive the
> Process descriptor? Even
> if I don't want to write anything?. Should'n be more logical to return a
> String only
> if you specify the "WAIT" flag?
>
> My first impression was that it was a bug, as I didn't specify WAIT but
> the program
> was blocked till the process finished... It makes more dificult the
> transition from
> Gambas1 to Gambas2 too in any program, as it is not only matter of
> change the
> position of the process descriptor in the line, but adding a useless flag.
>
> Could you please change this Benoît? I really do not find it useful nor
> intuitive.
>
> Regards,
>
> D. Campos
>

OK. Here is a new syntax:

1) [hProcess =] (EXEC | SHELL) ... [WAIT] [FOR READ|WRITE]
WAIT is never implicite in this syntax

2) (EXEC | SHELL) ... TO aString
WAIT is implicite then, and aString get the output of the process.

Is it better ?

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the Devel mailing list