Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
So why is the color change "permanent"?
#7
(04-24-2022, 04:50 PM)James D Jarvis Wrote:
Quote:Values passed to a sub retain any changes made in that sub.

Which I thought shouldn't happen unless the variables were explicitly shared or were returned as part of a function call. Darn it really has been ages since I used QB.

That is new to QB64, arguments in a Sub or Function were passed by what they call ByValue in older versions of QB but QB64 does them ByRef. So if you are going to change a variable value it is best to copy the incoming value into a variable for the Sub to work with and leave the incoming variable alone after.
b = b + ...
Reply


Messages In This Thread
RE: So why is the color change "permanent"? - by bplus - 04-24-2022, 04:56 PM



Users browsing this thread: 1 Guest(s)