A question about tagged functions
#1

So I found out that you can have functions with a tag, for example:
pawn Код:
Float:square(Float:a)
    return (a * a);
But if you compile this, the compiler will print out a warning:
Код:
: warning 208: function with tag result used before definition, forcing reparse
Then I found out that you have to use forward before the function, so:
pawn Код:
forward Float:square(Float:a);
Float:square(Float:a)
    return (a * a);
And now, the compiler will compile normally without any warnings. So, my question is: is it any better by using tagged functions or is it the same by using plain functions like this:
pawn Код:
square(Float:a)
    return (a * a);
Reply


Messages In This Thread
A question about tagged functions - by Joey^ - 27.03.2013, 13:57
Re: A question about tagged functions - by Joey^ - 27.03.2013, 15:09
Re: A question about tagged functions - by Sinner - 27.03.2013, 15:27
Re: A question about tagged functions - by Joey^ - 27.03.2013, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)