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.

Author
Message
anthonykulesa
14
Years of Service
User Offline
Joined: 25th Aug 2011
Location:
Posted: 25th Aug 2011 18:44
I am having some trouble getting my UDT variables to be modified by functions. Maybe Im doing something wrong? Here is the code Im using to test it. Its supposed to output 1 2 but it outputs 1 1.




any help is greatly appreciated.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Aug 2011 19:13
Variables passed into functions are passed by value, not by reference.

Another guy in the Newcomers forum is having the same issue as you - check out my responses.

anthonykulesa
14
Years of Service
User Offline
Joined: 25th Aug 2011
Location:
Posted: 25th Aug 2011 19:27
Ohhhhh okay... I didn't realize I could directly access the UDT in the function. I changed the code to this and it worked.



Thank you for the help! I look forward to being a contributing member of this forum!

Login to post a reply

Server time is: 2026-07-11 12:00:46
Your offset time is: 2026-07-11 12:00:46