On 08/03/2013 07:58 AM, bearophile wrote:

> Gabi:
>
>>   //HOW TO pass F1(..) the args we were called with ?
>
>
> import std.stdio;
>
> void f1(Args...)(Args args) {
>      foreach (arg; args)
>          arg.writeln;

Would you expect the following two lines behave the same?

    writeln(args);
    writefln("%s", args);

Apparently not:

10hello1.5
10

Why?

> }
>
> void f2(Args...)(Args args) {
>      f1(args);
> }
>
> void main() {
>      f2(10, "hello", 1.5);
> }
>
>
> Bye,
> bearophile

Ali

Reply via email to