*** Allow the passing of a variable length argument
list from one function to another:
SUB func1(a as integer, ...)
dim b as va_list;
func2(b);
END SUB
SUB func2(a as integer, ...)
...
END SUB
Example: the C RTL functions printf() and vprintf().
*** Add a mechanism to allow a variable length
argument list function or sub to know the number of
arguments without requiring the use of a parameter
that explicitly tell it:
SUB func1(a as integer, ...)
dim as integer b, i
b = va_count(a) ' would return the number of
arguemnts that follow a
for i = 1 to b
... use va_arg() to iterate the values
next i
va_end()
...
END SUB
OR make va_arg() return a special value when the last
value from the variable arg list has been retrieved.
See [#881]
Support for variadic functions added in commit [062fff] for fbc version 1.07.0
New API has been added using:
CVA_LIST
CVA_ARG()
CVA_START()
CVA_COPY()
CVA_END()
Related
Bugs:
#881Commit: [062fff]