Variadic function: Difference between revisions
Content added Content deleted
Line 1,824: | Line 1,824: | ||
Variable number of arguments to a macro can be done using the <tt>text</tt> keyword identifying the kind of argument to the macro. In this way, each argument can be of any kind (here, as example, I show all the primitive types that Metafont knows) |
Variable number of arguments to a macro can be done using the <tt>text</tt> keyword identifying the kind of argument to the macro. In this way, each argument can be of any kind (here, as example, I show all the primitive types that Metafont knows) |
||
<lang metafont> |
<lang metafont>def print_arg(text t) = |
||
for x = t: |
for x = t: |
||
if unknown x: message "unknown value" |
if unknown x: message "unknown value" |