Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusion over passing by reference vs passing by value
#4
(06-17-2022, 03:07 AM)SMcNeill Wrote: This is expected as strings are *always* passed by offsets.  The solution is as you have found -- assign to a temp variable and don't modify the original.  Wink

Ah, very good. I wasn't aware that there was a difference between how the strings and numerical variables were handled in this regard.

I learn new things every day. The trick is in trying to remember all of it :-)
Reply


Messages In This Thread
RE: Confusion over passing by reference vs passing by value - by hanness - 06-17-2022, 06:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Array out of passing arrays... Pete 2 408 09-22-2025, 08:53 PM
Last Post: ahenry3068
  Call by reference / value Kernelpanic 3 910 11-28-2023, 03:41 AM
Last Post: TerryRitchie
  Variable as a reference or value to a function Kernelpanic 22 4,264 08-08-2022, 07:41 PM
Last Post: bplus

Forum Jump:


Users browsing this thread: 1 Guest(s)