09-09-2022, 04:33 PM
I must add that the discussion above always applies in global scope. Within subprograms one has to be careful with using "global" variables, ie. those defined as "DIM SHARED" near the top of the source code, or declared as "SHARED" within the subprogram. Those could suddenly throw up an "Duplicate definition" or "Name already in use" (geez I despise this last one) when it has to do with global variables to be used inside subprograms. Otherwise "DIM x AS INTEGER", "DIM x AS _MEM" etc. could be freely implemented in subprograms kept separate from one another, and especially those found in "$INCLUDE'd" files.
Once there is a "DIM SHARED x AS LONG" before any subprogram cannot "re-type" "x" to anything else unless it's "x$" or other type which is not UDT (and in this example only, except "x&").
Once there is a "DIM SHARED x AS LONG" before any subprogram cannot "re-type" "x" to anything else unless it's "x$" or other type which is not UDT (and in this example only, except "x&").