Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
global variables
#3
I don't like the idea of sharing variables between files, so I have to think some more about it.

You could create "getter" and "setter" functions to read and modify these variables, maybe?

Code:
visible vMyString = "default"

function GetMyString()
   return vMyString
endfunch

function SetMyString(value)
   vMyString = value
endfunc

For a global array/table you probably just need a getter, since tables are of reference type.

Hope this helps!
Reply


Messages In This Thread
global variables - by aliensoldier - 11-18-2023, 04:15 PM
RE: global variables - by aliensoldier - 01-24-2024, 08:50 PM
RE: global variables - by Marcus - 01-24-2024, 09:22 PM
RE: global variables - by aliensoldier - 01-25-2024, 04:13 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)