Out of curiosity
#1

Out of curiosity I'm asking what the "&" in a function does.
Example:

pawn Code:
gettime(&hour, &minute, &second);
Reply
#2

To my knowledge (And I'm not certain about it) It indicates its a float.
Reply
#3

Quote:
Originally Posted by Tee
View Post
Out of curiosity I'm asking what the "&" in a function does.
Example:

pawn Code:
gettime(&hour, &minute, &second);
don't think it does anything?
I think you mean the % function right?
Reply
#4

Quote:
Originally Posted by BuuGhost
View Post
To my knowledge (And I'm not certain about it) It indicates its a float.
It's not a float.
Quote:
Originally Posted by milanosie
View Post
don't think it does anything?
I think you mean the % function right?
No, I mean "&".
Reply
#5

That means that the variable is read and write, where other wise the variable is read only (within the function).


you would use that instead of return if you have multiple returns.
Reply
#6

May I have an example?
Reply
#7

Quote:
Originally Posted by Tee
View Post
No, I mean "&".
It is explained in this tutorial with an example:

https://sampforum.blast.hk/showthread.php?tid=321465

Please try searching in the future.
Reply
#8

I did try but didn't really know the right keywords, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)