Android Question Unused routines.

agraham

Expert
Licensed User
Longtime User
Upvote 2

agraham

Expert
Licensed User
Longtime User
So I have to assume that you participate in the development of Anywhere Software tools, right?
I helped Erel in the initial development of B4A as I was a significant contributor to its predecessor Basi4ppc. I was the first (as far as I know) to run the initial versions of B4A to identify bugs and feedback to Erel. I wrote many of the initial libraries, some of which, like Reflection and ByteConverter are now part of the B4A standard libraries and some, like Threading, while important initially are less so now that Erel has written asynchronicity into other libraries that most benefit from it.

From one of our interchanges in 2010 during the development of B4A prior to release.


?
 
Upvote 1

LucaMs

Expert
Licensed User
Longtime User
I am about to clarify what I meant and then "close" the thread, as I have been privately asked questions.

The purpose of the warning about unused subs is to allow you to delete them in case you really don't need them anymore.

However, if the name of one of my routines that I will not actually use anymore (old version of my source) contains an underscore, the warning will not happen and my source will be less "clean".
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Glad to know about it ?
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
However, if the name of one of my routines that I will not actually use anymore (old version of my source) contains an underscore, the warning will not happen and my source will be less "clean".

The compiler cannot know which subs are "events subs" and relies on the convention that such subs have an underscore in their name.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Yes, @AnandGupta , even if I sometimes read lightly, too fast, and maybe I will lose my sight and the last two neurons, for the moment I think I understand the answer.

But, again... if I were to create/have (old module) a Sub whose name contained an underscore and my project didn't use it, it would be useful for me to have the IDE warn me; otherwise I am forced to avoid underscores in Subs that are not events.

My answers are probably convoluted ?
|
|
V

Two of the main problems of humanity:

1 - everyone's mother tongue should be Italian;

2 - the only existing programming language should be B4X.

?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…