[Info-vax] VAX BASIC global variables.

Jeffrey H. Coffield jeffrey at digitalsynergyinc.com
Fri Oct 15 13:32:18 EDT 2021



On 10/14/2021 05:23 PM, E Thump wrote:
> 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
>
>
>

I guess the real question for me is what do you want to do with Basic?

Jeff Coffield
www.digitalsynergyinc.com




More information about the Info-vax mailing list