Declare multiple global variables at once
10 views (last 30 days)
I'm writing a fairly meaty code with lots of sub functions and scripts. To avoid human error, I made a script that contains hundreds of constants and unit conversions. The code would look something like this:
[a,b] = mySubFunction(c,d,e)
Where mySubFunction would call the variables assigned in UnitConverter. However, I really don't want to declare every single individual variable as a global one such that mySubFunction can read it. Is there a better way to do this?