Here is an example of code I often use at the start of a subroutine for tracking program progress in debug mode:
As you can see, I have to tailor it for each sub with the sCodeName = <name of sub> line.
Is there a way to use identical code in each sub, using something like "sCodeName = getsubname"?
I've been looking for a way to do this ever since I started using it in VB years ago.
B4X:
Sub SetupPanel(pnlParent As Panel, lblFirstLetter As Label)
Dim sCodeName As String
sCodeName = "SetupPanel"
Log("Sub " & sCodeName)
Dim lItemHeight As Long
etc
As you can see, I have to tailor it for each sub with the sCodeName = <name of sub> line.
Is there a way to use identical code in each sub, using something like "sCodeName = getsubname"?
I've been looking for a way to do this ever since I started using it in VB years ago.