Confusion over passing by reference vs passing by value
#2
To be honest it looks like a bug to me. I checked the behavior in QB45 to be sure, and using () to pass a string by value works as expected. Additionally it seems extra bugged because doing
(a$ + "")
also does not properly pass by value, and neither does
a$ + ""
(both of which pass by value in QB45). Functionally though the problem is just that it is not being properly copied before calling the function, so they're all basically the same issue.

Edit: I created a GitHub issue for this: https://github.com/QB64-Phoenix-Edition/...issues/116
Reply


Messages In This Thread
RE: Confusion over passing by reference vs passing by value - by DSMan195276 - 06-17-2022, 01:03 AM



Users browsing this thread: 2 Guest(s)