Restored from previous forum. Originally posted by VeKem.
Hi,
in the feature list of v 3.0 there is:
"Added: Variable command argument for any function"
Can somebody give an example? Means this perhaps:
Procedure MyProc(par1.l, par2.l)
;... code depending on parameters (!)
; how to access more parameters?
EndProcedure
MyProc(12, 15, 4, 6) 'call with more or less parameters than defined before?
Thanks for your answers and help!
Markus Vedder-Kemnitzer, Germany
Registered PureBasic-User
[Implemented] Variable command argument for any functio
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
I think Fred had the library functions in mind, i.e. that you could code libraries with functions that can take a variable amount of parameters. This is what i think, anyone who knows for sure how things are?Hi,
in the feature list of v 3.0 there is:
"Added: Variable command argument for any function"
Can somebody give an example? Means this perhaps:
Procedure MyProc(par1.l, par2.l)
;... code depending on parameters (!)
; how to access more parameters?
EndProcedure
MyProc(12, 15, 4, 6) 'call with more or less parameters than defined before?
Thanks for your answers and help!
Markus Vedder-Kemnitzer, Germany
Registered PureBasic-User
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Danilo.
Yes, thats for the PureBasic Libraries.
Example:
There are some commands that already use it,
like CopyMemoryString() and CompareMemoryString()
for example, but i think in the feature we´ll get
more commands with varARGs.
cya,
...Danilo
(registered PureBasic user)
Yes, thats for the PureBasic Libraries.
Example:
Code: Select all
Command >> StrF( Value.f [,NbDecimal] )
how to use:
myvar.f = 2.20371
Result1$ = StrF( myvar )
Result2$ = StrF( myvar, 2 )
like CopyMemoryString() and CompareMemoryString()
for example, but i think in the feature we´ll get
more commands with varARGs.
cya,
...Danilo
(registered PureBasic user)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm