variadic functions

0ffh frank at youknow.what.todo.interNETz
Fri Jan 4 02:26:50 PST 2008


BCS wrote:
> Reply to 0ffh,
> 
>> Hrmmnn... I hope this is not the gazillionth time:
>>
>> Can I pass on the parameters from one variadic function to the next?
>> Just passing on _argptr (in analogy to C) does not seem to work. :(
>>
>> regards, frank
>>
> 
> WANRING HACK
> 
> byte* from = "the lower bound of the args";
> byte* to = "the upper bound of the args";
> variadicFn(from[0..to-from]);
> 
> As long as you arn't using the type safe version that might work.

Thanks a bunch! I'll try that out of curiosity, but I admit I have
already settled on a workaround to make the downstream functions
non-variadic, with an explicit argptr parameter (although that's
a kluge, admittedly).

regards, frank


More information about the Digitalmars-d-learn mailing list