06-17-2022, 02:30 PM
(06-17-2022, 02:21 PM)DSMan195276 Wrote:Quote:Ah, very good. I wasn't aware that there was a difference between how the strings and numerical variables were handled in this regard.
FWIW I think that Steve and I have different opinions on this They're intended to all work the same, as they did in QB45 (there's a reason the Wiki doesn't say anything about strings and stuff working differently ). But that said it seems that after some investigation QB64 has significant problems regarding pass by value behavior for anything not "simple" like integers. I think it should be a bug considered for fixing, but either way it's probably best to avoid it for now.
I don't think we're of different opinions -- I agree 100% with the statement that the way we handle it is currently bugged.
My opinion on the issue however is: I'm not smart enough to sort out how the BLEEP to fix the problem, so it's best -- for now -- for folks to learn to avoid the possible pitfalls that can come from using the glitchy "pass via parentheses" method.
Personally, I'd love to see the issue fixed. I just couldn't sort out how to fix it myself, so until it does get fixed, I figure it's best to just warn folks to be very careful with such code and to use temp or STATIC variables when possible to avoid the issue completely.