11-23-2023, 01:28 PM
Thanks MNR..
so a Dim Shared variable or array, once created will carry a value of zero. That value can not change unless there is a routine or subroutine somewhere in the programs code to change it. IF the variable or array is created locally within a subroutine, shouldn't there be an error for a non exiting entity if the main module tries to use it?
For example
Dim Shared A As Integer
Print A
Print B
TestB
Sub TestB
Dim B
B = 1
End Sub
In the above code only the variable A was created in the main module. The B variable is not created until the subroutine is called. So the command to Print B before it is actually created, shouldn't that trigger an error?
so a Dim Shared variable or array, once created will carry a value of zero. That value can not change unless there is a routine or subroutine somewhere in the programs code to change it. IF the variable or array is created locally within a subroutine, shouldn't there be an error for a non exiting entity if the main module tries to use it?
For example
Dim Shared A As Integer
Print A
Print B
TestB
Sub TestB
Dim B
B = 1
End Sub
In the above code only the variable A was created in the main module. The B variable is not created until the subroutine is called. So the command to Print B before it is actually created, shouldn't that trigger an error?