### Handling Return Value

Example of handling a value from a resumable sub. This is based on the info from the resumable sub tutorial:
1. Whenever Sleep or Wait For are called, the current sub is paused. This is equivalent to Return.
2. Calling Sleep or Wait For is equivalent to calling Return from the caller sub perspective.
' Logger1 ("caller sub") calls logger2 and waits for logger2 completion ("logger1 is paused").
' In logger2 the var r is set, which value is obtained in log1.
`Private Sub Logger1
' Call Logger2 and wait for its completion. The Logger2 Completion sub has a string parameter which is logged.
Logger2
wait for Logger2_Completed(str As String)
' Get the Logger2 string
Log(str)
End Sub`
`Private Sub Logger2
Dim str As String = "Hello World!"
Sleep(500)
' Call Logger2 Completed with the string parameter
CallSubDelayed2(Me, "Logger2_Completed", str)
End Sub`
`Private Sub Logger2_Completed(str As String)
' Do nothing
End Sub`

Changed: , Category: Resumable Subs, File: T6C242M1767.htm, ID: 1767