Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
37
Task/Variadic-function/FutureBasic/variadic-function.basic
Normal file
37
Task/Variadic-function/FutureBasic/variadic-function.basic
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
void local fn Function1( count as long, ... )
|
||||
va_list ap
|
||||
long value
|
||||
|
||||
va_start( ap, count )
|
||||
while ( count )
|
||||
value = fn va_argLong( ap )
|
||||
printf @"%ld",value
|
||||
count--
|
||||
wend
|
||||
|
||||
va_end( ap )
|
||||
end fn
|
||||
|
||||
void local fn Function2( obj as CFTypeRef, ... )
|
||||
va_list ap
|
||||
|
||||
va_start( ap, obj )
|
||||
while ( obj )
|
||||
printf @"%@",obj
|
||||
obj = fn va_argObj(ap)
|
||||
wend
|
||||
|
||||
va_end( ap )
|
||||
end fn
|
||||
|
||||
window 1
|
||||
|
||||
// params: num of args, 1st arg, 2nd arg, etc.
|
||||
fn Function1( 3, 987, 654, 321 )
|
||||
|
||||
print
|
||||
|
||||
// params: 1st arg, 2nd arg, ..., NULL
|
||||
fn Function2( @"One", @"Two", @"Three", @"O'Leary", NULL )
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue