gmqcc/tests/varargs.qc
Wolfgang Bumiller 61b777f575 vararg testcases
2013-01-12 16:37:26 +01:00

14 lines
413 B
C++

void(string...) print = #1;
string(float) ftos = #2;
void nbva(float a, string...count) {
print("You gave me ", ftos(count), " additional parameters\n");
print("First: ", ...(0, string), "\n");
print("You chose: ", ...(a, string), "\n");
for (a = 0; a < count; ++a)
print("Vararg ", ftos(a), " = ", ...(a, string), "\n");
}
void main() {
nbva(1, "Hello", "You", "There");
}