26.11.2015, 15:33
Quote:
Ahh, ok for example about static inside functions i do this:
Код:
stock function() { static a =50; a++; print("%d", a); } function(); function(); see i used "function();" two times, that means the first time it will return 50 + 1 = 51 and then, it will return the second time 52 because it kept "51" and it added 1 after am i right? and one little question, can we use static for strings? ![]() |
And second yes you can use static for each type of variable you want to use BUT you have to be sure that the VARIABLE you want to change is the same type as the static variable(If i am not wrong!)