gapi Active Member Licensed User Longtime User Jun 6, 2012 #1 Hi all how can make a IF THEN END IF for null values or not ? My problem are any Cursor1.GetString where any field are null !! In for structure I want know if they are null (don't print) else (print) ^^ tnx Last edited: Jun 6, 2012
Hi all how can make a IF THEN END IF for null values or not ? My problem are any Cursor1.GetString where any field are null !! In for structure I want know if they are null (don't print) else (print) ^^ tnx
eps Expert Licensed User Longtime User Jun 6, 2012 #2 Try this : Basic4android Search: if null 2nd in the list looks good.... http://www.b4x.com/forum/basic4android-updates-questions/12879-testing-null-value.html#post72627 HTH Upvote 0
Try this : Basic4android Search: if null 2nd in the list looks good.... http://www.b4x.com/forum/basic4android-updates-questions/12879-testing-null-value.html#post72627 HTH
R Roger Garstang Well-Known Member Licensed User Longtime User Jun 6, 2012 #4 I had this same issue the other day and needed to see if a variable in a Tag that stored a view reference was null. I kept having issues and it was coming back as not null even when it was not set to a view. Finally used the IsInitialized like Erel recommends. Still confusing since if not assigned a view it should be null and IsInitialized would/should throw a null pointer error too. Upvote 0
I had this same issue the other day and needed to see if a variable in a Tag that stored a view reference was null. I kept having issues and it was coming back as not null even when it was not set to a view. Finally used the IsInitialized like Erel recommends. Still confusing since if not assigned a view it should be null and IsInitialized would/should throw a null pointer error too.
JoanRPM Active Member Licensed User Longtime User Jun 7, 2012 #5 Hi. I simply do: Code: Copy if a = Null Then It has always worked (for me). Upvote 0