In php underscore ("_") it's declaration of private/protected function but i didn't found anything about it in PAWN. Does it have any meaning in PAWN?
Asked
Active
Viewed 183 times
1 Answers
3
It depends.
In function name doesn't mean anything so _hello
just means that the function is named _hello
. (Then, if you prefer, you can read all function which starts with an underscore as function that must not be called in public code. But PAWN doesn't force you)
If you mean the underscore in the parameters when you call a function, then it means "Use the default value" so if you have
stock hello(num = 5) { }
then you can do hello(_)
and hello
will be called with num
with 5
(default value).

Marco Acierno
- 14,682
- 8
- 43
- 53
-
Thank you for your answer. Now i have confirmation of my conjectures. – Paradiso Jun 19 '15 at 20:09
-
1Also `_:` means a tagless cell. – IS4 Nov 13 '15 at 15:39