P Pantelis Member Licensed User Longtime User May 31, 2013 #1 Hi In beginners guide says Process global variables are the only "public" variables. Click to expand... So, if i declare a variable in process_globals like this Code: Copy Dim I as Int the I is a public variable? I try to declare, again in process_global, the same variable using Code: Copy Public I As Int and it gives no error. Both declarations gives me public variables? Any difference? What if i use Code: Copy Public I As Int in globals an not in process_globals?
Hi In beginners guide says Process global variables are the only "public" variables. Click to expand... So, if i declare a variable in process_globals like this Code: Copy Dim I as Int the I is a public variable? I try to declare, again in process_global, the same variable using Code: Copy Public I As Int and it gives no error. Both declarations gives me public variables? Any difference? What if i use Code: Copy Public I As Int in globals an not in process_globals?
klaus Expert Licensed User Longtime User May 31, 2013 #2 Dim is equivalent to Public ! What if i use Public I As Int in Globals ? It's a Global variable. Public and Private declarations are important in Class modules. They were introduced when classes were introduced. If you declare Dim As Int in a Sub Class_Globals Routine it's considered as Public. Best regards. Upvote 0
Dim is equivalent to Public ! What if i use Public I As Int in Globals ? It's a Global variable. Public and Private declarations are important in Class modules. They were introduced when classes were introduced. If you declare Dim As Int in a Sub Class_Globals Routine it's considered as Public. Best regards.
P Pantelis Member Licensed User Longtime User Jun 2, 2013 #3 OK. Thank you for the reply klaus. Upvote 0