I don't think I understood what you were saying.
I probably didn't ask the question correctly.
Let's see now, what is the difference between the first way and the second way, which is more advisable?
B4X:
Sub btOK_Click(X As Int, Y As Int)
CallSubDelayed3("","DoSomething",X,Y)
End Sub
Sub DoSomething( X As Int, Y As Int )
Log(X&" : "&Y)
End Sub
B4X:
Sub btOK_Click(X As Int, Y As Int)
DoSomething(X,Y)
End Sub
Sub DoSomething( X As Int, Y As Int )
Log(X&" : "&Y)
End Sub
Sub btOK_Click(X As Int, Y As Int)
CallSubDelayed3("","DoSomething",X,Y)
Dim A As Int = 120
Log(A)
End Sub
Sub DoSomething( X As Int, Y As Int )
Log(X&" : "&Y)
End Sub
you would see the difference; using CallSubDelayed, before the execution of DoSomething the log of A would be executed, that is, all subsequent lines of che "calling sub", only at the end DoSomething would be executed.
Sub btOK_Click(X As Int, Y As Int)
CallSubDelayed3("","DoSomething",X,Y)
Dim A As Int = 120
Log(A)
'other instructions
'''
End Sub
'is equivalent to
Sub btOK_Click(X As Int, Y As Int)
Dim A As Int = 120
Log(A)
'other instructions
'''
DoSomething(X,Y)
End Sub
Sub btOK_Click(X As Int, Y As Int)
CallSubDelayed3("","DoSomething",X,Y)
Dim A As Int = 120
Log(A)
'other instructions
'''
End Sub
'is equivalent to
Sub btOK_Click(X As Int, Y As Int)
Dim A As Int = 120
Log(A)
'other instructions
'''
DoSomething(X,Y)
End Sub