Simple Mouse Wheel Scolling
#7
https://qb64phoenix.com/qb64wiki/index.php/FILES

Check out the example on the rewritten "DIR$()". It has a good example of "STATIC" to signal when the first time a subprogram is called, to give some values to the variables only at that point and not at the second or further times the same subprogram is called. A variable declared "STATIC" inside a subprogram really is a global variable but is not accessible to the "main program" or other modules that might be connected but kept separately from the "main program."

"DIM SHARED" is the only way supported in Freebasic to allow subprograms to look at arrays without needing to use clunky pointers to pass them as parameters. "SHARED" inside a subprogram isn't allowed there; QB64(PE) allows it but it's considered bad practice to rely on it. The other programming system has OOP concepts (code and data security of a running program) which means "SHARED" has no place in it.

Don't be confused by my having to mention a programming system other than QB64(PE); it's my attempt to explain how fortunate we really are to be able to do things that we've learned with Q(uick)BASIC or GW-BASIC or some other dialect. However, from GW-BASIC/BASICA to QuickBASIC/QBasic things became different indeed with needing to split code into modules and scopes, and Visual Basic went even further.
Reply


Messages In This Thread
Simple Mouse Wheel Scolling - by Pete - 11-12-2022, 03:52 AM
RE: Simple Mouse Wheel Scolling - by james2464 - 11-12-2022, 04:16 AM
RE: Simple Mouse Wheel Scolling - by mnrvovrfc - 11-12-2022, 04:24 AM
RE: Simple Mouse Wheel Scolling - by james2464 - 11-12-2022, 04:38 AM
RE: Simple Mouse Wheel Scolling - by Pete - 11-12-2022, 04:56 AM
RE: Simple Mouse Wheel Scolling - by Pete - 11-12-2022, 04:52 AM
RE: Simple Mouse Wheel Scolling - by mnrvovrfc - 11-12-2022, 05:17 AM
RE: Simple Mouse Wheel Scolling - by james2464 - 11-12-2022, 05:30 AM
RE: Simple Mouse Wheel Scolling - by mnrvovrfc - 11-17-2022, 10:22 AM
RE: Simple Mouse Wheel Scolling - by grymmjack - 12-27-2022, 11:41 PM



Users browsing this thread: 6 Guest(s)