Global variables
BlitzPlus Forums/BlitzPlus Programming/Global variables
| ||
is there a way to you have global variables by default, or do i have to declare one by one..? Thank you!!! |
| ||
If you have a variable inside a function that you want to be global, yes, you must declare it as global outside the function. You can do this, though: Global i%, j%, k%, str$, str2$, str3$, percent1%, percent2% Function myfunc() i% = 1 ; These would be local str$ = "Hello" ; if they weren't declared percent1% = .75 ; as Global outside of this scope End Function |