15.02.2014, 19:44
In that case it tells the function that this variable should be passed by reference
That means if you change the variable inside the function it will also change outside
Array are always passed by reference
That means if you change the variable inside the function it will also change outside
pawn Code:
main() {
new
var1 = 3,
var2 = 3
;
MyFunc(var1, var2);
printf("%d, %d", var1, var2); // 3, 5
}
MyFunc(value, & reference) {
value = 5;
reference = 5;
}

