[Gambas-user] Variable numbers of arguments
gambasfr at ...11...
Tue Oct 11 22:47:20 CEST 2005
Le Mardi 11 Octobre 2005 15:29, vinians a écrit :
> Hi again!
> I need to make a function like 'printf' which have a variable number of
> arguments how to do this in Gambas?
> Function MyPrintf(sFormat as String, Args as Variant...) as String or
> something like this ;P
> ps. I dont want to use Arrays but true variable parameters
> Thanks in advance
it exist in gambas :)
subst(MyPatternString as String, Args as String,...)
PRINT Subst("Hello &1, i'm &2 year old", "dude", str(age))
You can do a function yourself... but dynamic argument exist only in gambas2
with the '...' statement and param class.
More information about the User