08.10.2009, 11:37
If you still didn't understand it yet and the people didn't seem to make sense to you, here is a small explaination of how it works. It does not have to be accurate to the true explaination of how it works!
When using a constant/macro(define) you usually sometimes need special values like in functions e.g.
As defines(macros) do not differ from value types, they have no different type. You probably know what a string, a integer, a float, a double etc means.
Defines do not care if its a string, a value or anything else.
So, when giving a define the possibility of holding values, you just count it down how many it are, e.g.
All you have to do, when adding values to your function is counting up the numbers more likely. e.g. %1,%2,%3,%4 and so on.
I hope my personal explaination made you understand the sense behind all this. If you wish to know the exact explaination of how it works and the actually
more used words, such as macro, constant etc, you should read up the manuel.
Regards,
Extremo.
When using a constant/macro(define) you usually sometimes need special values like in functions e.g.
pawn Код:
stock Function(string[], arg)
{
// do something here
}
Defines do not care if its a string, a value or anything else.
So, when giving a define the possibility of holding values, you just count it down how many it are, e.g.
pawn Код:
#define Function(%1,%2) // Let it do something here with the values
I hope my personal explaination made you understand the sense behind all this. If you wish to know the exact explaination of how it works and the actually
more used words, such as macro, constant etc, you should read up the manuel.
Regards,
Extremo.

