The 'a' in the dim statement is not the same as the 'a' in the type statement.
If the dim and type statements are in Process_Globals then
The type statement creates a java class containing the field named 'a' which is only guaranteed to be 0 after the initialize method is called.
public static class _mytype
{
public boolean IsInitialized;
public int a;
public void Initialize()
{
this.IsInitialized = true;
this.a = 0;
}
The dim statement creates a java variable called '_a' which is set to 0.
public static int _a = 0;