Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Function pass by reference/pass by value

Author
Message
bigtunacan
8
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 28th Jul 2015 04:56
It looks like AGK2 functions default to pass by value. Is there a way to pass by reference?
Wilf
Valued Member
17
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 28th Jul 2015 08:58 Edited at: 28th Jul 2015 08:59
Yes - here's the relevant doc.

Quote: "Previously only types could be passed into functions and they were passed by value, meaning the type would be copied into a new variable which was then deleted at the end of the function. Now types can be passed by reference meaning that the variable being passed in will be modified by any changes in the function"





bigtunacan
8
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 28th Jul 2015 15:46
Thanks, that was exactly what I was looking for!

Login to post a reply

Server time is: 2024-03-29 13:19:01
Your offset time is: 2024-03-29 13:19:01