[Info-vax] VAX BASIC global variables.
E Thump
ethump at gmail.com
Thu Oct 14 20:23:46 EDT 2021
Hi -
Any VAX BASIC folk here?
Need some help - am new to VAX BASIC (yeah, in 2021!!)
I come from BBC Basic where all variables are global unless explicitly defined as local to a sub/proc.
VAX BASIC seems to operate the opposite way; IE variables by default are local. QB64 also seems to operate this way however in QB64, I am able to DIM SHARED [var_name] which makes a variable accessible globally.
How do I accomplish the same in VAX BASIC? I want a variable declared at the top to be common throughout all the code, SUBs and all. At this time, I'm working with a single source file.
I'm looking at the COMMON keyword but I can't see how that works for what I want, if at all it does!
Cheers,
e
More information about the Info-vax
mailing list