[Include] variadic.inc - Variadic functions!
#7

Okay, updated. Now you can do this:

pawn Код:
var MyPrint(str[])
{
    new
        output[128];

    format(output, sizeof(output), str, @variadic[1]);
    return print(output);
}
And then you can do this for example:

pawn Код:
MyPrint("%s is cool.", "Emmet");
However, this is just an experimental "proof-of-concept" include - you should still use y_va for this stuff.
Reply


Messages In This Thread
variadic.inc - Variadic functions! - by Emmet_ - 06.12.2013, 14:09
Re: variadic.inc - Variadic functions! - by iZN - 06.12.2013, 17:33
Re: variadic.inc - Variadic functions! - by PT - 06.12.2013, 20:16
Re: variadic.inc - Variadic functions! - by Emmet_ - 07.12.2013, 03:27
Re: variadic.inc - Variadic functions! - by Niko_boy - 07.12.2013, 04:01
Re: variadic.inc - Variadic functions! - by Emmet_ - 07.12.2013, 05:17
Re: variadic.inc - Variadic functions! - by Emmet_ - 09.12.2013, 19:49
Re: variadic.inc - Variadic functions! - by kristo - 14.03.2016, 15:04
Re: variadic.inc - Variadic functions! - by Pottus - 27.05.2017, 19:11
Re: variadic.inc - Variadic functions! - by Dice_ - 28.05.2017, 19:35
Re: variadic.inc - Variadic functions! - by DRIFT_HUNTER - 28.05.2017, 19:48
Re: variadic.inc - Variadic functions! - by Pottus - 28.05.2017, 20:26
Re: variadic.inc - Variadic functions! - by kristo - 29.05.2017, 17:14
Re: variadic.inc - Variadic functions! - by KinG7 - 29.05.2017, 17:26
Re: variadic.inc - Variadic functions! - by Pottus - 29.05.2017, 22:31

Forum Jump:


Users browsing this thread: 6 Guest(s)