K kris A Member Licensed User Longtime User Mar 17, 2015 #1 what is the B4A equivalent of nz() for null to zero in vb?
Erel B4X founder Staff member Licensed User Longtime User Mar 17, 2015 #2 Where does the null come from? Such a method is not required in most cases. Upvote 0
K kris A Member Licensed User Longtime User Mar 17, 2015 #4 nevertheless I think it is important to have nz function. Upvote 0
T Troberg Well-Known Member Licensed User Longtime User Mar 17, 2015 #5 I didn't even know VB had that, after working with it since 3.0 was released. I've used my own NullToZero and NullToEmptyString instead... As soon as you work with databases, chances are that nulls will occur. So, some null handling is quite useful to have. Upvote 0
I didn't even know VB had that, after working with it since 3.0 was released. I've used my own NullToZero and NullToEmptyString instead... As soon as you work with databases, chances are that nulls will occur. So, some null handling is quite useful to have.
T Troberg Well-Known Member Licensed User Longtime User Mar 17, 2015 #6 It's not that hard to make your own: B4X: Sub NullToZero(Value as float) as float If Value = null Then Return 0 Else Return Value End If End Sub ...or something along those lines (can't syntax check it now). Upvote 0
It's not that hard to make your own: B4X: Sub NullToZero(Value as float) as float If Value = null Then Return 0 Else Return Value End If End Sub ...or something along those lines (can't syntax check it now).