DIEGO TREJO Member Licensed User Longtime User Oct 31, 2019 #1 [SOLVED] In B4i, the GetType function always returns __NSCFNumber regardless of whether the data is Int, Byte, Float, Decimal or Long. Is there a way to differentiate these types of data? I am interested in differentiating the Long type Last edited: Oct 31, 2019
[SOLVED] In B4i, the GetType function always returns __NSCFNumber regardless of whether the data is Int, Byte, Float, Decimal or Long. Is there a way to differentiate these types of data? I am interested in differentiating the Long type
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2019 #2 No. Where does the data come from? Upvote 0
DIEGO TREJO Member Licensed User Longtime User Oct 31, 2019 #3 From nowhere in particular. I just need to differentiate the Long type from the other numerical types, since it is used to store DateTime Upvote 0
From nowhere in particular. I just need to differentiate the Long type from the other numerical types, since it is used to store DateTime
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2019 #4 There isn't enough information here but you should probably store a custom type instead of just the number. This can be done with KVS2 or B4XSerializator. Upvote 0
There isn't enough information here but you should probably store a custom type instead of just the number. This can be done with KVS2 or B4XSerializator.
Semen Matusovskiy Well-Known Member Licensed User Oct 31, 2019 #5 I use Is statement. For example, if x is an object: Code: If x Is Int Then ... If x Is Long Then ... If x Is Float Then ... If x Is Double Then ... Upvote 0
I use Is statement. For example, if x is an object: Code: If x Is Int Then ... If x Is Long Then ... If x Is Float Then ... If x Is Double Then ...
DIEGO TREJO Member Licensed User Longtime User Oct 31, 2019 #6 Great idea Mr. Matusovskiy, it worked well for me. Upvote 0