marcick Well-Known Member Licensed User Longtime User Dec 14, 2023 #1 Is it a programming mistake to do something like this in Process_Global ? Private curNotifyID As Int = 101
Is it a programming mistake to do something like this in Process_Global ? Private curNotifyID As Int = 101
marcick Well-Known Member Licensed User Longtime User Dec 14, 2023 #3 aeric said: It is correct. Why you think so? Click to expand... I've read somewhere that you should just declare the type of variable in Process_Global, then assign a value in another place Upvote 0
aeric said: It is correct. Why you think so? Click to expand... I've read somewhere that you should just declare the type of variable in Process_Global, then assign a value in another place
LucaMs Expert Licensed User Longtime User Dec 14, 2023 #4 If I'm not mistaken, the compiler once didn't allow those initializations. I don't like it, in my opinion the initializations should be put... guess what? Sub Initialize. But it's not a mistake or a big deal. Upvote 0
If I'm not mistaken, the compiler once didn't allow those initializations. I don't like it, in my opinion the initializations should be put... guess what? Sub Initialize. But it's not a mistake or a big deal.
Alessandro71 Well-Known Member Licensed User Longtime User Dec 14, 2023 #5 Since code modules do not require an Initialize sub, I guess that assign in declaration is required for that use case Upvote 0
Since code modules do not require an Initialize sub, I guess that assign in declaration is required for that use case
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2023 #6 Assignment of numeric and string types is fine and considered good practice. Upvote 0