Thread
:
Dynamic Arrays in SourcePawn
View Single Post
BAILOPAN
Developer
Join Date: Jan 2004
08-08-2012 , 14:39 Re: Dynamic Arrays in SourcePawn
#
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
View Public Profile
Send a private message to BAILOPAN
Visit BAILOPAN's homepage!
Find More Posts by BAILOPAN