Carthalion Member Licensed User Longtime User Oct 15, 2016 #1 Declaring variables in Starter and using them in another module works great. Is there a way to put a Sub in Starter and calling it from another module? I did search for this and it looks like a No, but I would really like to economize my code if this is possible.
Declaring variables in Starter and using them in another module works great. Is there a way to put a Sub in Starter and calling it from another module? I did search for this and it looks like a No, but I would really like to economize my code if this is possible.
fixit30 Active Member Licensed User Longtime User Oct 15, 2016 #2 Have a search for CallSubDelayed Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 16, 2016 #3 You can use CallSub or CallSubDelayed to call a sub in any other service including the starter service. Upvote 0
You can use CallSub or CallSubDelayed to call a sub in any other service including the starter service.
Carthalion Member Licensed User Longtime User Oct 16, 2016 #4 It absolutely works! I was trying it with: CallSub Starter.MySub (Starter.MyString works with a variable). Using CallSub(Starter, "MySub") works. Thank you. Upvote 0
It absolutely works! I was trying it with: CallSub Starter.MySub (Starter.MyString works with a variable). Using CallSub(Starter, "MySub") works. Thank you.