View Single Post
BAILOPAN
Join Date: Jan 2004
Old 08-08-2012 , 14:39   Re: Dynamic Arrays in SourcePawn
Reply With Quote #33

Some languages (like C#) distinguish "Value" types from "Reference" types, and they behave in that category under every condition. SourcePawn doesn't do that. Arrays are value types, (and structs will be too), but they are passed as references - in the former case because it makes the most sense, and in the latter case for performance. But scalar variables are value types and are passed as values. So the rule is basically "composite types are always passed as references."
__________________
egg

Last edited by BAILOPAN; 08-08-2012 at 14:40.
BAILOPAN is offline