J jiuciyu_2008 Member Licensed User Longtime User Oct 26, 2016 #1 I got this error when compile my code: B4R version: 1.20 Parsing code. (0.00s) Compiling code. Error Error compiling program. Error description: Cannot set a Const variable (global non-primitive variables are always constants). Occurred on line: 19 s1="123456" Word: = And the code is: Code: Copy Sub Process_Globals Public Serial1 As Serial Public s1 As String End Sub Private Sub AppStart s1="123456" Serial1.Initialize(115200) hardstream.Initialize(Serial1.Stream,"hardstream_NewData",Null) End Sub
I got this error when compile my code: B4R version: 1.20 Parsing code. (0.00s) Compiling code. Error Error compiling program. Error description: Cannot set a Const variable (global non-primitive variables are always constants). Occurred on line: 19 s1="123456" Word: = And the code is: Code: Copy Sub Process_Globals Public Serial1 As Serial Public s1 As String End Sub Private Sub AppStart s1="123456" Serial1.Initialize(115200) hardstream.Initialize(Serial1.Stream,"hardstream_NewData",Null) End Sub
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2016 #2 This is not a bug: https://www.b4x.com/android/forum/threads/memory-variables-and-objects.65672/#content For further discussion please start a new thread in the questions forum.
This is not a bug: https://www.b4x.com/android/forum/threads/memory-variables-and-objects.65672/#content For further discussion please start a new thread in the questions forum.