B Bryan Member Licensed User Longtime User Aug 22, 2014 #1 This is very strange. It doesn't matter where I declare it , it always shows up underlined in green as an unused variable. Dim StatusIn as Boolean I put it in globals it shows as being unused. I put it in the beginning of the Activity_Create sub it shows up as being unused. The variable is used in Activity_Create. I even changed the variable to a different name a few times and still the same thing. If I remove the declaration of this variable then the variable (StatusIn) is red. I noticed this trying to debug other problems I having. I have one other Boolean variable and it is fine. It is not underlined in green. I don't want to post all my code because it is going to be a product that will be sold on google play. Any ideas? Bryan
This is very strange. It doesn't matter where I declare it , it always shows up underlined in green as an unused variable. Dim StatusIn as Boolean I put it in globals it shows as being unused. I put it in the beginning of the Activity_Create sub it shows up as being unused. The variable is used in Activity_Create. I even changed the variable to a different name a few times and still the same thing. If I remove the declaration of this variable then the variable (StatusIn) is red. I noticed this trying to debug other problems I having. I have one other Boolean variable and it is fine. It is not underlined in green. I don't want to post all my code because it is going to be a product that will be sold on google play. Any ideas? Bryan
KMatle Expert Licensed User Longtime User Aug 22, 2014 #2 b4a has some logic checks and finds out when a variable isn't used (even if you seen it and assign a value to it later in the code). This may occur in a IF... THEN... scenario when b4a thinks it will never be called/used due to a faulty logic. Put it in globals and change (for a test) the value somewhere else (f.e. in crate without any conditions) Upvote 0
b4a has some logic checks and finds out when a variable isn't used (even if you seen it and assign a value to it later in the code). This may occur in a IF... THEN... scenario when b4a thinks it will never be called/used due to a faulty logic. Put it in globals and change (for a test) the value somewhere else (f.e. in crate without any conditions)
Erel B4X founder Staff member Licensed User Longtime User Aug 22, 2014 #3 Are you sure that the variable value is actually used? Not only declared? If yes then if possible please send me your project by mail ([email protected]). Upvote 0
Are you sure that the variable value is actually used? Not only declared? If yes then if possible please send me your project by mail ([email protected]).
LucaMs Expert Licensed User Longtime User Aug 22, 2014 #4 to be sure that the variable is not used, use the F7 key on it. Upvote 0
B Bryan Member Licensed User Longtime User Aug 22, 2014 #5 Erel said: Are you sure that the variable value is actually used? Not only declared? If yes then if possible please send me your project by mail ([email protected]). Click to expand... Yes, it is actually used. Declared in globals, Used in Activity_Create. It has been removed from my code now because I'm not going to use that variable any longer. I am away from my programming computer so it will be awhile before I can get back to working with it. My project is using many classes and is getting quite large now so I will see if I can streamline it a bit and recreate the problem. Upvote 0
Erel said: Are you sure that the variable value is actually used? Not only declared? If yes then if possible please send me your project by mail ([email protected]). Click to expand... Yes, it is actually used. Declared in globals, Used in Activity_Create. It has been removed from my code now because I'm not going to use that variable any longer. I am away from my programming computer so it will be awhile before I can get back to working with it. My project is using many classes and is getting quite large now so I will see if I can streamline it a bit and recreate the problem.
B Bryan Member Licensed User Longtime User Aug 24, 2014 #6 Erel said: Are you sure that the variable value is actually used? Not only declared? If yes then if possible please send me your project by mail ([email protected]). Click to expand... Here is an example of what I am talking about. This is from the table class v1.36 that I am using. I am just going to upload an image of my screen. Attachments Variable_problem.png 154.8 KB · Views: 501 Upvote 0
Erel said: Are you sure that the variable value is actually used? Not only declared? If yes then if possible please send me your project by mail ([email protected]). Click to expand... Here is an example of what I am talking about. This is from the table class v1.36 that I am using. I am just going to upload an image of my screen.
Erel B4X founder Staff member Licensed User Longtime User Aug 24, 2014 #7 I see that it is assigned. Where is the value used? Upvote 0
klaus Expert Licensed User Longtime User Aug 24, 2014 #8 You can remove the three lines 1503 - 1505. Upvote 0