Hello!
I've just received the 7.30 update and I've read the changelog and this post, and I still don't get the ResumableSub type advantage/need... I mean, I see the different syntax, but I don't understand what could be achieved with a ResumableSub that couldn't be done without it. I've read comments about lot of ideas or uses, but I don't see the difference between this:
and this
Can anyone give me a tip?
Thank you very much!
I've just received the 7.30 update and I've read the changelog and this post, and I still don't get the ResumableSub type advantage/need... I mean, I see the different syntax, but I don't understand what could be achieved with a ResumableSub that couldn't be done without it. I've read comments about lot of ideas or uses, but I don't see the difference between this:
B4X:
Sub Button1_Click
Wait For(Sum(1, 2)) Complete (Result As Int)
Log("result: " & Result)
Log("after sum")
End Sub
and this
B4X:
Sub Button1_Click
Dim rs As ResumableSub = Sum(1, 2)
Wait For(rs) Complete (Result As Int)
Log("result: " & Result)
Log("after sum")
End Sub
Can anyone give me a tip?
Thank you very much!