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. Code: Copy Sub Globals Public someVariable = 1 End Sub gives error Code: Copy 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. Code: Copy Sub Globals Public someVariable = 1 End Sub gives error Code: Copy 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: Code: Copy 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: Code: Copy Dim x = 34 'ERROR The second case is fine and the variable will be public.