Bug? Wait For Complete

Star-Dust

Expert
Licensed User
Longtime User
An anomaly was reported to me today. A code that is marked error that is compiled and works

B4X: Copy
Private Sub Main
  log(1)
  Wait For (Pausa) Complete   ' Don't write (Result a Boolean)
  log(2)
End Sub

Private Sub Pausa As ResumableSub
  Sleep(4000)
  ' don't write Return Boolean
End Sub

It works in B4A, B4J but it doesn't work in B4i.

I guess it's an anomaly, it shouldn't wait if the COMPLETE doesn't return anything. It should not compile if the ResumableSub does not return a value
 

Attachments

Note that in b4a and b4j it would work even if Pause returned a value (I don't know in B4i because... you know).
In b4i it only works if it is written correctly. If the return is missing or if the value after COMPLETE is missing it does not work
 
Is it because B4A and B4J compile to Java while B4i compiles to Objective-C code so they are different?
 
Beyond the practical reason I suppose it is not the expected behavior otherwise it would behave the same on all platforms
 
I'm sure it doesn't work in b4i

In any case, regardless of how it works on B4i, I wanted an answer from Erel to understand if this is an expected behavior.

Since Erel has always suggested to insert a variable even without any significant value
 
I'm sure it doesn't work in b4i

In any case, regardless of how it works on B4i, I wanted an answer from Erel to understand if this is an expected behavior.

Since Erel has always suggested to insert a variable even without any significant value
Too bad we always have to wait for Erel.
Should there be more than one Erel or we should force him to work 7 days a week ?
 
Thanks Erel, it's not a big deal. It was just to confirm what I thought.
 

Similar Threads

Back
Top