c3c icon indicating copy to clipboard operation
c3c copied to clipboard

Macro varargs

Open lerno opened this issue 4 years ago • 1 comments

It should be easy to copy varargs from a macro, e.g.

macro foo(args...)
{
    call_func(...args);
}

lerno avatar Jul 04 '21 23:07 lerno

In this case:

func macro foo(a, #b, $c)
{   ... }
func macro bar(args....)
{
    @foo(...args);
}

The code cannot know that we want to keep argument 2 unevaluated, 1 evaluated and 3 having to be constant. In this case, passing everything unevaluated would work. But at other times we want the evaluation to occur.

lerno avatar Jul 24 '21 12:07 lerno

Implemented using $vaarg ct functions.

lerno avatar Aug 27 '22 01:08 lerno