Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Whats better to SHARED or not
#16
Consider using TYPE for variables, unless you are working with mostly arrays. Very easy to pass typed variables instead of adding each variable to the sub or function call. Personally, I got tired of looking at sub calls with 20+ passed variables. Using TYPE solved that clutter situation, nicely.

I used to do all global variables, to save memory, back in the 1990's. To make things even more difficult, the names had to be very short to save memory, too. Most of mine were just 1 or 2 characters. Still, I managed to get a 250 K multi-modular routine running that way, so I'm not one to knock the value of global variables. They can work, but now that name length isn't an issue, I'd probably use some underscore system to identify what routine it was involved in like cnt_keyboard%, for example.

Pete

Okay, had to come back to edit in @SpriggsySpriggs. That comment cracked me up!
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: 3 Guest(s)