Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whats better to SHARED or not
#11
(11-07-2024, 10:13 PM)madscijr Wrote:
(11-07-2024, 10:08 PM)Kernelpanic Wrote: I don't really understand your problem description, but in general, local variables are preferable to global ones in every respect. In general, but sometimes one can't avoid it.

GoSub is one of those things... The QBasic/QuickBasic reference says that this is only supported for compatibility reasons, but it is not recommended.
Yeah, gosub is one of those hallmarks of spaghetti code that I completely avoid!

I got the same aversion about GOTO.  It's the sauce in spaghetti code "Once you use it hard to control where it goes, or gets used."  I basically try to only use it as a way at the bottom of code to get to the top.  I avoid for/next, in favor of do/loops.  In a do/loop I can use loop exit, instead of another goto.
Reply


Messages In This Thread
Whats better to SHARED or not - by doppler - 11-07-2024, 04:23 PM
RE: Whats better to SHARED or not - by ahenry3068 - 11-07-2024, 04:29 PM
RE: Whats better to SHARED or not - by bplus - 11-07-2024, 05:02 PM
RE: Whats better to SHARED or not - by madscijr - 11-07-2024, 10:01 PM
RE: Whats better to SHARED or not - by doppler - 11-07-2024, 08:04 PM
RE: Whats better to SHARED or not - by madscijr - 11-07-2024, 10:13 PM
RE: Whats better to SHARED or not - by doppler - 11-08-2024, 03:10 AM
RE: Whats better to SHARED or not - by bplus - 11-07-2024, 11:39 PM
RE: Whats better to SHARED or not - by bplus - 11-07-2024, 11:44 PM
RE: Whats better to SHARED or not - by vince - 11-08-2024, 06:39 AM
RE: Whats better to SHARED or not - by madscijr - 11-10-2024, 06:13 PM
RE: Whats better to SHARED or not - by Pete - 11-08-2024, 06:59 PM



Users browsing this thread: 2 Guest(s)