[Gambas-user] EXEC - Command

Benoit Minisini gambas at ...1...
Fri Jul 22 14:14:43 CEST 2005


On Wednesday 20 July 2005 14:24, monty wrote:
> Hello.
>
> If you use the EXEC Command with an App that uses lots of Arguments
> and the User can select them in a Dialog for Example, you have to write
> Monstercode to get an EXEC-Command for each Possibilitie or use
> some strange Tricks.
>
> A Command like this besides the normal EXEC maybe makes it easier:
>
> 	EXEC[ AppName, ArgumentsCount as INTEGER, ArgumentsArray as STRING ]
>
> Just an Idea.
>
> Michael Galm
>

The second argument of EXEC is just a string array. The '[' / ']' are not a 
syntax specific to EXEC, it is just a function that creates array, a 
synonymous for Array().

You can write:

DIM aExec AS NEW String[]

aExec.Add(myCommand)
aExec.Add(myArg1)
...
aExec.Add(myArgN)

EXEC aExec ...

Regards,

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




More information about the User mailing list