Wish Default "Result" variable in functions, i.e. subs that return a value

Would you take advantage of a default Return Result variable?


  • Total voters
    4

qsrtech

Active Member
Licensed User
Longtime User
Sorry already asked but need to elevate it again.

Example
B4X:
Sub ReturnSomething as int
    result=1+1 'no need to declare the local result variable
    Return result
End Sub
 

barx

Well-Known Member
Licensed User
Longtime User
I, personally, don't understand the question....
 

qsrtech

Active Member
Licensed User
Longtime User
It's like having a "sender" variable when subs are called, only it's a "returner" that doesn't need to be manually dimmed. Just helps to save time, that's what a RAD IDE is for (and help delay carpal tunnel)
 
Last edited:
Top