[INFO]Forward + public
#1

There is no method more convenient and fast, without declaring the various forward?, many say, useless, many are in almost all functions:

Code:
forward function(a, b);
public function(a, b) {
   return a+b;    
}
and totally unnecessary to say ...
Reply
#2

And what's your point in all this ?, what do you need help with ?
Reply
#3

I say if there a way to speed ..
Reply
#4

Ye i want to ask what's the difference if the forward thing is above the public function, or on top of the script..
Reply
#5

Quote:
Originally Posted by svaba
View Post
Ye i want to ask what's the difference if the forward thing is above the public function, or on top of the script..
Nothing I don't think.
Reply
#6

There is no difference...since your doing the SAME thing.
Reply
#7

So ?
Reply
#8

so ... ?
Reply
#9

So, nothing, it doesnt matter if you put the forward in the first line or in the line before the public

Although publics are only needed if you use it for timers or call it via CallLocal / RemoteFunction

You asked if there is a convenient and fast way, fast no but a convenient maybe

Just add a little macro and call it whatever you want

pawn Code:
#define function%0(%1) forward%0(%1); public%0(%1)
pawn Code:
function add(a, b) { // although this is a pretty bad example and should NEVER be used
   return a + b;    
}
Reply
#10

Quote:
Originally Posted by TheBluec0de
View Post
There is no method more convenient and fast, without declaring the various forward?, many say, useless, many are in almost all functions:

Code:
forward function(a, b);
public function(a, b) {
   return a+b;    
}
and totally unnecessary to say ...
Wha.. Wha... What??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)