B4R Question How to return a value from a procedure

AndroidMadhu

Active Member
Licensed User
Hello All,
I want to return the value totalcount from a procedure [flowcalc]to [jobdone] procedure to send the totalcount data to webpage.

Here is the code snippet for the procedure flowcalc
B4X:
Private Sub flowcalc()
    
    If counter=0 Then
        Return
    Else
        Do While counter>0
            totalCounter=(totalCounter+counter)
            counter=0
            set=False
        Loop
    End If       
End Sub
I want to get the totalcount data at Jobdone procedure
B4X:
Sub jobdone(Job As JobResult)
    
End Sub

Is there is any way to perform the same? Please advice
 
Top