B4J Question sleep(0)

le_toubib

Active Member
Licensed User
Longtime User
hi all
i recently migrated to the resumable subs
i must say it s beautiful
but i wonna ask a newbie question
in a resumable sub , i call a function and use the returned value for the following code ,
e.g :
B4X:
x = extractNumbersFromString( "sampletext5")
dim y as string = temlist.get(x)
in the above code i found x =0 unless i separate both lines with a sleep(0) ..only then x=5
is this a correct action ?

B4X:
x = extractNumbersFromString( "sampletext5")
sleep(0)
dim y as string = temlist.get(x)
 
Top