Jump to content

Variadic function: Difference between revisions

m
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)
 
<lang metafont>ddefdef print_arg(text t) =
for x = t:
if unknown x: message "unknown value"
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.