aeric Expert Licensed User Longtime User Feb 10, 2025 #21 b4x-de said: IsNotInitalized() Click to expand... Just write: B4X: If Not(IsInitialized(Lst)) Then Return ' equivalent to: If IsInitialized(Lst) = False Then Return opps: peacemaker is faster.
b4x-de said: IsNotInitalized() Click to expand... Just write: B4X: If Not(IsInitialized(Lst)) Then Return ' equivalent to: If IsInitialized(Lst) = False Then Return opps: peacemaker is faster.
Daestrum Expert Licensed User Longtime User Feb 10, 2025 #22 Erel wrote in post #5 Note that it will eventually be IsNotInitialized due to name conflicts.
b4x-de Active Member Licensed User Longtime User Feb 10, 2025 #23 Thanks, I am aware of the Not operator. But if we try to make things easier, we might consider the common use cases first.
Thanks, I am aware of the Not operator. But if we try to make things easier, we might consider the common use cases first.
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2025 #24 Daestrum said: Note that it will eventually be IsNotInitialized due to name conflicts. Click to expand... That is indeed the case. IsNotInitialized does make sense. Similar to SQL IsNull. I did prefer IsInitialized as it is a bit simpler to grasp as we can end with double negation with IsNotInitialized: Code: If IsNotInitialized(Button1) = False Then Button.Text = "abc" 'or If Not(IsNotInitialized(Button1)) Then ... But we will need to get used to this
Daestrum said: Note that it will eventually be IsNotInitialized due to name conflicts. Click to expand... That is indeed the case. IsNotInitialized does make sense. Similar to SQL IsNull. I did prefer IsInitialized as it is a bit simpler to grasp as we can end with double negation with IsNotInitialized: Code: If IsNotInitialized(Button1) = False Then Button.Text = "abc" 'or If Not(IsNotInitialized(Button1)) Then ... But we will need to get used to this
Daestrum Expert Licensed User Longtime User Feb 10, 2025 #25 Maybe, just a suggestion drop the 'is' then code becomes Code: If NotInitialized(something) then ....
Maybe, just a suggestion drop the 'is' then code becomes Code: If NotInitialized(something) then ....
udg Expert Licensed User Longtime User Feb 10, 2025 #26 If NotInitialized(something) then .... Click to expand... Double negation is stil possible, and also a very ugly Code: if Not(NotInizialized(something) then ..
If NotInitialized(something) then .... Click to expand... Double negation is stil possible, and also a very ugly Code: if Not(NotInizialized(something) then ..
Daestrum Expert Licensed User Longtime User Feb 10, 2025 #27 But surely you would just use 'Else' if it was Initialised.
udg Expert Licensed User Longtime User Feb 10, 2025 #28 Sure. I was just pointing out a possible ugly syntax. Anyway I'm sure Erel will choose the form he believes will be easier and better for us. We will learn how best to use it ( knowing it'll be not mandatory) as we did in the past with other language innovations.
Sure. I was just pointing out a possible ugly syntax. Anyway I'm sure Erel will choose the form he believes will be easier and better for us. We will learn how best to use it ( knowing it'll be not mandatory) as we did in the past with other language innovations.
Sandman Expert Licensed User Longtime User Feb 10, 2025 #29 Erel said: Note that it will eventually be IsNotInitialized due to name conflicts. Click to expand... About the name conflict, would it make a difference if you simply named it Initialized? B4X: If Not(Initialized(Lst)) Then Return
Erel said: Note that it will eventually be IsNotInitialized due to name conflicts. Click to expand... About the name conflict, would it make a difference if you simply named it Initialized? B4X: If Not(Initialized(Lst)) Then Return
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2025 #30 Sandman said: About the name conflict, would it make a difference if you simply named it Initialized? Click to expand... Daestrum said: Maybe, just a suggestion drop the 'is' then code becomes Click to expand... Two good suggestions that I need to check.
Sandman said: About the name conflict, would it make a difference if you simply named it Initialized? Click to expand... Daestrum said: Maybe, just a suggestion drop the 'is' then code becomes Click to expand... Two good suggestions that I need to check.
S Spavlyuk Active Member Licensed User Longtime User Feb 11, 2025 #31 What about making it similar to the C# is null syntax? Could avoid all the useless parentheses. B4X: If Variable Is Initialized Then Return If Variable Is Not Initialized Then Return
What about making it similar to the C# is null syntax? Could avoid all the useless parentheses. B4X: If Variable Is Initialized Then Return If Variable Is Not Initialized Then Return
MrKim Well-Known Member Licensed User Longtime User Apr 30, 2025 #32 Interesting. I had a boolean variable called Initialized and the latest version of b4j didn't like it so I changed it to IsInitialized and it works fine But Maybe I should change it again.
Interesting. I had a boolean variable called Initialized and the latest version of b4j didn't like it so I changed it to IsInitialized and it works fine But Maybe I should change it again.