Minty23185Fresh
August 2nd, 2016, 16:25
I am modifying the 5E ActionManager2 functions encodeAdvantage(rRoll, bADV, bDIS) and decodeAdvantage(rRoll) for my extension.
I have noticed that for changes made to the values of the arguments within the functions, sometimes the new values are reflected back in the calling function (as if by reference) and sometimes not (as if by value)! What the heck?
Is seems as thought the simple boolean variables bADV and bDIS are passed by value, since changes are not reflected back to the caller.
Whereas any changes made to the values in the table variable rRoll, do get reflected back to the caller, indicating passed by reference.
Do I have this about right? Is there more to this?
(I always search the forums for this stuff before posting, and never seem to find the answers, I hope this hasn't been answered already. Thanks in advance for your help.)
I have noticed that for changes made to the values of the arguments within the functions, sometimes the new values are reflected back in the calling function (as if by reference) and sometimes not (as if by value)! What the heck?
Is seems as thought the simple boolean variables bADV and bDIS are passed by value, since changes are not reflected back to the caller.
Whereas any changes made to the values in the table variable rRoll, do get reflected back to the caller, indicating passed by reference.
Do I have this about right? Is there more to this?
(I always search the forums for this stuff before posting, and never seem to find the answers, I hope this hasn't been answered already. Thanks in advance for your help.)