S slydog43 Member Licensed User Longtime User Feb 17, 2011 #1 there is no support for an "Exit sub", any plans to. Also what about functions, ie a sub that returns a value
there is no support for an "Exit sub", any plans to. Also what about functions, ie a sub that returns a value
agraham Expert Licensed User Longtime User Feb 17, 2011 #2 Use "Return" or "Return SomeValue". The Sub declaration can include the return type Sub somthing(aparameter as sometype) As Double Dim avalue As Double ... ' da-di-da Return avalue End Sub Upvote 0
Use "Return" or "Return SomeValue". The Sub declaration can include the return type Sub somthing(aparameter as sometype) As Double Dim avalue As Double ... ' da-di-da Return avalue End Sub
nfordbscndrd Well-Known Member Licensed User Longtime User Feb 18, 2011 #3 slydog43 said: there is no support for an "Exit sub", any plans to. Also what about functions, ie a sub that returns a value Click to expand... You might be interested in this Visual Basic to B4A conversion table that contains this information and a lot more. Upvote 0
slydog43 said: there is no support for an "Exit sub", any plans to. Also what about functions, ie a sub that returns a value Click to expand... You might be interested in this Visual Basic to B4A conversion table that contains this information and a lot more.
I Inman Well-Known Member Licensed User Longtime User Feb 24, 2011 #5 nfordbscndrd said: You might be interested in this Visual Basic to B4A conversion table that contains this information and a lot more. Click to expand... Thank you very much. Just what I was looking for. Upvote 0
nfordbscndrd said: You might be interested in this Visual Basic to B4A conversion table that contains this information and a lot more. Click to expand... Thank you very much. Just what I was looking for.
O Omar Member Licensed User Longtime User Jul 19, 2011 #6 Sorry for bringing up an old thread but I found a recent issue which I wanted to confirm. I am working with subs and found that even after I use return to send back a value the code following the Return function is still executing. Should this be happening? I thought that once the Return function is called the sub is exited immediately. Upvote 0
Sorry for bringing up an old thread but I found a recent issue which I wanted to confirm. I am working with subs and found that even after I use return to send back a value the code following the Return function is still executing. Should this be happening? I thought that once the Return function is called the sub is exited immediately.
Erel B4X founder Staff member Licensed User Longtime User Jul 19, 2011 #7 Code after a Return call cannot be executed. Upvote 0
O Omar Member Licensed User Longtime User Jul 19, 2011 #8 Thanks Erel. That is what I thought also, not sure why this is happening but I will check the code again later today. Upvote 0
Thanks Erel. That is what I thought also, not sure why this is happening but I will check the code again later today.
netsistemas Active Member Licensed User Longtime User Oct 5, 2015 #9 Be careful, if you include a RETURN in debug mode, you can get error in internal java parser. Stop, and run your app again. Upvote 0
Be careful, if you include a RETURN in debug mode, you can get error in internal java parser. Stop, and run your app again.
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2015 #10 This is an old thread. You should have started a new thread instead. I'm not familiar with the issue you are describing. Please post more information (in a new thread). Upvote 0
This is an old thread. You should have started a new thread instead. I'm not familiar with the issue you are describing. Please post more information (in a new thread).