corwin42 Expert Licensed User Longtime User Aug 27, 2008 #1 If I try to initialize global variables which are declared as public on the same line as the declaration I get very strange error message. B4X: Sub Globals Public someVariable = 1 End Sub gives error B4X: Sub Globals Public someVariable someVariable = 1 End Sub is fine Greetings, Markus
If I try to initialize global variables which are declared as public on the same line as the declaration I get very strange error message. B4X: Sub Globals Public someVariable = 1 End Sub gives error B4X: Sub Globals Public someVariable someVariable = 1 End Sub is fine Greetings, Markus
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2008 #2 The first syntax is not supported. It wasn't supported in previous versions as well: B4X: Dim x = 34 'ERROR The second case is fine and the variable will be public.
The first syntax is not supported. It wasn't supported in previous versions as well: B4X: Dim x = 34 'ERROR The second case is fine and the variable will be public.