V
Volte
Hey, wondering if there is a va_list equivalent in Javascript. Well,
actually, I know that there is, but I don't know if its user...
applicable. va_list in C/++ anyhow is a way of being able to pass in
any number of arguments at the end of a function, I'll show an example:
So as you can see, the space is reserved at the end of the function
declaration with the "..." syntax, and in the function body is expanded
and processed. I could be way off here, but I think I'm on the right
track. Thanks for the help.
Cheers.
actually, I know that there is, but I don't know if its user...
applicable. va_list in C/++ anyhow is a way of being able to pass in
any number of arguments at the end of a function, I'll show an example:
Code:
Header:
void addLine(int, const char*, ...);
cpp:
addLine(int line, const char *string, ...) {
char *output;
va_list args;
va_start(args, string);
vasprintf(&output, string, args);
va_end(args);
}
So as you can see, the space is reserved at the end of the function
declaration with the "..." syntax, and in the function body is expanded
and processed. I could be way off here, but I think I'm on the right
track. Thanks for the help.
Cheers.