Anonymous user
Variadic function: Difference between revisions
→[[Varargs#ALGOL 68]]
Line 21:
''However'' a flexible array of tagged types (union) <u>is</u> permitted. This effectively
allows the passing of strongly typed variable arguments to procedures.
PROC print strint = (FLEX[]STRINT argv)VOID: (
▲ MODE STRINT = UNION(STRING, INT, PROC(REF FILE)VOID);
IF i NE UPB argv THEN print((space)) FI
);▼
▲ )
Output:
<newpage>
Mary had 1 little
Also note that EMPTY (of type VOID) can be used to indicate missing or optional arguments.
'''ALGOL 68''' does not have anything similar the keyword argument found in python.
=={{header|Common Lisp}}==
|