Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What are libraries
#5
(04-24-2022, 04:31 PM)Dimster Wrote: How do you guard against the duplication of variable names - same variable name in the main v's the in the library or does it matter?

Variables in Subs and Functions are private AKA localĀ unless SHARED or CONST from the main code which make them Global. It is the beauty of Subs or Functions over GOSUBs you can use the same variable name x, y, r differently in a Sub or Function and won't change the x, y, r in main code unless you pass through arguments and change it in Sub or Function.

They, variable values, could get messed up if you pass them to a sub or function as arguments and that sub or function changes them. Be careful with that, member, Gets, just caught that happening with permanent color change help question.
b = b + ...
Reply


Messages In This Thread
What are libraries - by bplus - 04-24-2022, 01:07 PM
RE: What are libraries - by dcromley - 04-24-2022, 04:16 PM
RE: What are libraries - by bplus - 04-24-2022, 04:30 PM
RE: What are libraries - by Dimster - 04-24-2022, 04:31 PM
RE: What are libraries - by bplus - 04-24-2022, 04:44 PM
RE: What are libraries - by PhilOfPerth - 04-24-2022, 10:49 PM
RE: What are libraries - by bplus - 04-25-2022, 02:35 AM



Users browsing this thread: 2 Guest(s)