Z ZiX Member Licensed User Mar 28, 2018 #1 Hi, I'm new in b4a. I've reading the docs and can't find any information about the right way of creating and using global constants. Can somebody explain how I can do that. For ex. I want to create constant newOrderState = 5 and then use it from any module. P.S. Sorry - create this thread in wrong section. Move it to b4a pls.
Hi, I'm new in b4a. I've reading the docs and can't find any information about the right way of creating and using global constants. Can somebody explain how I can do that. For ex. I want to create constant newOrderState = 5 and then use it from any module. P.S. Sorry - create this thread in wrong section. Move it to b4a pls.
K keirS Well-Known Member Licensed User Longtime User Mar 28, 2018 #2 Add a new code module and define your constants as Public const in the new module. Then you ran refer to them by the modulename.constantname in any module. Upvote 0
Add a new code module and define your constants as Public const in the new module. Then you ran refer to them by the modulename.constantname in any module.
Z ZiX Member Licensed User Mar 28, 2018 #3 Should I define it in Sub Process_Globals, or just Public Const OrderState = 3 at the new line? Upvote 0
K keirS Well-Known Member Licensed User Longtime User Mar 28, 2018 #4 In Sub Process_Globals. Upvote 0