imgsimonebiliato Well-Known Member Licensed User Longtime User Nov 21, 2014 #1 Hello, I need to create 2 new Sub with the same name, so the user can use one or the other. Is it possible?
Hello, I need to create 2 new Sub with the same name, so the user can use one or the other. Is it possible?
MikeH Well-Known Member Licensed User Longtime User Nov 21, 2014 #2 No, but you can send a value to the sub and then upon entering the sub do an if/then or select/case depending on that value. Upvote 0
No, but you can send a value to the sub and then upon entering the sub do an if/then or select/case depending on that value.
imgsimonebiliato Well-Known Member Licensed User Longtime User Nov 21, 2014 #3 Yes, it could be a possibility but the code isn't written in the best way Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 21, 2014 #4 The user doesn't know the subs names. You can name them any way you want. Upvote 0
imgsimonebiliato Well-Known Member Licensed User Longtime User Nov 21, 2014 #5 Erel said: The user doesn't know the subs names. You can name them any way you want. Click to expand... Sorry not the user, the programmer Upvote 0
Erel said: The user doesn't know the subs names. You can name them any way you want. Click to expand... Sorry not the user, the programmer
DonManfred Expert Licensed User Longtime User Nov 21, 2014 #6 imgsimonebiliato said: Sorry not the user, the programmer Click to expand... then the programmer (YOU) can use THIS or the OTHER sub... Where is the problem? Last edited: Nov 21, 2014 Upvote 0
imgsimonebiliato said: Sorry not the user, the programmer Click to expand... then the programmer (YOU) can use THIS or the OTHER sub... Where is the problem?
imgsimonebiliato Well-Known Member Licensed User Longtime User Nov 23, 2014 #7 That I want to create: B4X: Sub create Txt (t as text) Sub create Txt (t as text, g as gravity) Upvote 0
MikeH Well-Known Member Licensed User Longtime User Nov 23, 2014 #8 Use: B4X: Sub create Txt (t as text, g as gravity) and when you dont need the second value just send null e.g. create("Here`s some text", null) Upvote 0
Use: B4X: Sub create Txt (t as text, g as gravity) and when you dont need the second value just send null e.g. create("Here`s some text", null)