EduardoElias Well-Known Member Licensed User Longtime User Jun 30, 2013 #1 I am using 2.71 I see sometimes the compiler gets lost, for example: on class_globals the variable is defined like this Code: Copy Public FOnUpdateItemPanel As Object = Null However on the code is like this, note there is the missing 'F' on the front of the variable. There is no other sub, class, library or whatever with this same name. Code: Copy Public Sub SetOnUpdateItemPanel(Module As Object) OnUpdateItemPanel = Module End Sub The OnUpdateItemPanel is displayed in RED, but if you compile the application the variable is accepted. I see this commonly happen when the variable names are changed, that is the case. I have changed a lot of variable adding the 'F' on the declaration and every place it needed to be changed the IDE was reporting, however on this place it did not report, besides remained in red, and compiler was succesful. Thanks Eduardo
I am using 2.71 I see sometimes the compiler gets lost, for example: on class_globals the variable is defined like this Code: Copy Public FOnUpdateItemPanel As Object = Null However on the code is like this, note there is the missing 'F' on the front of the variable. There is no other sub, class, library or whatever with this same name. Code: Copy Public Sub SetOnUpdateItemPanel(Module As Object) OnUpdateItemPanel = Module End Sub The OnUpdateItemPanel is displayed in RED, but if you compile the application the variable is accepted. I see this commonly happen when the variable names are changed, that is the case. I have changed a lot of variable adding the 'F' on the declaration and every place it needed to be changed the IDE was reporting, however on this place it did not report, besides remained in red, and compiler was succesful. Thanks Eduardo
thedesolatesoul Expert Licensed User Longtime User Jun 30, 2013 #2 This is because B4A does not force you explicitly declare a variable. With out the 'F' it just creates a new variable. However you will see a warning for this.
This is because B4A does not force you explicitly declare a variable. With out the 'F' it just creates a new variable. However you will see a warning for this.
EduardoElias Well-Known Member Licensed User Longtime User Jun 30, 2013 #3 thedesolatesoul said: This is because B4A does not force you explicitly declare a variable. With out the 'F' it just creates a new variable. However you will see a warning for this. Click to expand... Thank you in explain that, I used always to explicit declare variable because the other languages that I use. I am sorry to not be aware of that and create this thread. Eduardo
thedesolatesoul said: This is because B4A does not force you explicitly declare a variable. With out the 'F' it just creates a new variable. However you will see a warning for this. Click to expand... Thank you in explain that, I used always to explicit declare variable because the other languages that I use. I am sorry to not be aware of that and create this thread. Eduardo
Erel B4X founder Staff member Licensed User Longtime User Jul 2, 2013 #4 In v2.7 you should also see a yellow warning line under this line (and in the warnings list) when you compile your app or save it.
In v2.7 you should also see a yellow warning line under this line (and in the warnings list) when you compile your app or save it.