E enonod Well-Known Member Licensed User Longtime User Jan 16, 2013 #1 Is there a way to do something like the following if a string is returned as the result of a test routine? returned values can be say "a" or "b" or "c" ... test&returned ... sub testa ... end sub sub testb ... end sub sub testc ... end sub
Is there a way to do something like the following if a string is returned as the result of a test routine? returned values can be say "a" or "b" or "c" ... test&returned ... sub testa ... end sub sub testb ... end sub sub testc ... end sub
derez Expert Licensed User Longtime User Jan 16, 2013 #2 Why not use one sub with select ? (case a...case b... etc.) Upvote 0
mc73 Well-Known Member Licensed User Longtime User Jan 16, 2013 #3 Derez is right. Still, if you insist, you can use callSub, by setting as the second parameter, the test&returned string. Upvote 0
Derez is right. Still, if you insist, you can use callSub, by setting as the second parameter, the test&returned string.
E enonod Well-Known Member Licensed User Longtime User Jan 17, 2013 #4 Thank you. It simply did not occur to me Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 17, 2013 #5 You can also use CallSub or CallSubDelayed methods to call a sub based on a string. Upvote 0