Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Question on Calls to Subroutines
#10
The "B" in the main program is of course zero. . . because the variable was not initialized. - Every variable in QuickBasic is basically zero until it is initialized with a value.

So the global A + B are zero. The B in the procedure, on the other hand, was initialized and in this case correctly results in 1.

[Image: I-say-Captain2-2023-11-25.jpg]
Reply


Messages In This Thread
A Question on Calls to Subroutines - by Dimster - 11-22-2023, 04:43 PM
RE: A Question on Calls to Subroutines - by Kernelpanic - 11-25-2023, 10:16 PM



Users browsing this thread: 3 Guest(s)