Returning more than one thing.
#4

Quote:
Originally Posted by Daren_Jacobson
Посмотреть сообщение
pass them by reference as arguments, so say I want to return the variables a and b depending on what c is I would do
pawn Код:
RandomFunction(&a, &b, c)
{
    a = c - 3;
    b = c - 7;
    return 1;
}
so

pawn Код:
new alpha, beta, gamma = 25, delta;
delta = RandomeFunction(alpha, beta, gamma);
alpha == 22
beta == 18
gamma == 25
delta = 1
Why delta will be 1 ?
Reply


Messages In This Thread
Returning more than one thing. - by Danny - 07.07.2011, 19:45
Re: Returning more than one thing. - by Daren_Jacobson - 07.07.2011, 19:49
Re: Returning more than one thing. - by Danny - 07.07.2011, 19:51
Re: Returning more than one thing. - by Shadoww5 - 08.07.2011, 03:04
Re: Returning more than one thing. - by Donya - 08.07.2011, 03:44
Re: Returning more than one thing. - by Deskoft - 08.07.2011, 03:59

Forum Jump:


Users browsing this thread: 1 Guest(s)