S SCS Member Licensed User Longtime User Mar 11, 2014 #1 Declared the variable in Process_Globals Code: Copy Sub Process_Globals Dim refID As Int: refID = 0 End Sub for entire project usage. This variable use in another active module. When compiling, above message show in log Code: Copy Unused Variable 'refID'. (warning #9) And when we want to use this variable, we need to code it in this format Main.refID and not just refID in another module. Can we just ignore this error or will it have any side effect to the project?
Declared the variable in Process_Globals Code: Copy Sub Process_Globals Dim refID As Int: refID = 0 End Sub for entire project usage. This variable use in another active module. When compiling, above message show in log Code: Copy Unused Variable 'refID'. (warning #9) And when we want to use this variable, we need to code it in this format Main.refID and not just refID in another module. Can we just ignore this error or will it have any side effect to the project?
lemonisdead Well-Known Member Licensed User Longtime User Mar 11, 2014 #2 Yes you can absolutely ignore this warning. Because you use it elsewhere as you wrote it. No problem here And if you want not this error to be displayed you can take a look at the way to tweak the editor: http://www.b4x.com/android/forum/threads/compiler-warnings.28950/#content Last edited: Mar 11, 2014 Upvote 0
Yes you can absolutely ignore this warning. Because you use it elsewhere as you wrote it. No problem here And if you want not this error to be displayed you can take a look at the way to tweak the editor: http://www.b4x.com/android/forum/threads/compiler-warnings.28950/#content
Erel B4X founder Staff member Licensed User Longtime User Mar 12, 2014 #3 Change Dim to Public. It will remove this warning. It is better to declare global variables with Private or Public. Upvote 0
Change Dim to Public. It will remove this warning. It is better to declare global variables with Private or Public.