SA-MP Forums Archive
What is "const" for? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is "const" for? (/showthread.php?tid=130635)



What is "const" for? - Miguel - 27.02.2010

I've seen it a lot of times in some callbacks or similar.

pawn Код:
public Custom(/*>>>>>>>*/ const /*<<<<<<<<*/ text[])
What is that?


Re: What is "const" for? - ¤Adas¤ - 27.02.2010

It says, that the variable is constant and it can not be overwritten.


Re: What is "const" for? - Fedee! - 27.02.2010

It's like read-only on Windows.


Re: What is "const" for? - Correlli - 27.02.2010

You can find a good explanation in the pawn-lang.pdf file.


Re: What is "const" for? - Miguel - 27.02.2010

Quote:
Originally Posted by ¤Adas¤
It says, that the variable is constant and it can not be overwritten.
Enough for me... thanks guys.