]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
manpage: -fvariadic-args
authorWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 15:31:51 +0000 (16:31 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 15:31:51 +0000 (16:31 +0100)
doc/gmqcc.1

index ed88235ebbf77972405a4f4d91a2eb2b57fa218b..a67c1f5557a2a0b7571e75478753d958bf363b05 100644 (file)
@@ -477,6 +477,23 @@ Various effects, usually to weaken some conditions.
 Allow local variables named 'nil'. (This will not allow declaring a
 global of that name.)
 .RE
 Allow local variables named 'nil'. (This will not allow declaring a
 global of that name.)
 .RE
+.TP
+.B -fvariadic-args
+Allow variadic parameters to be accessed by QC code. This can be
+achieved via the '...' function, which takes a parameter index and a
+typename.
+
+Example:
+.sp
+.in +4
+.nf
+void vafunc(string...count) {
+    float i;
+    for (i = 0; i < count; ++i)
+        print(...(i, string), "\\n");
+}
+.fi
+.in
 .SH OPTIMIZATIONS
 .TP
 .B -Opeephole
 .SH OPTIMIZATIONS
 .TP
 .B -Opeephole