developingprogrammer
asked on
Test if number is integer
Hey guys, I know there are various ways of testing if a number is an integer or not, but what's the best way to do it? The sort of "official" IsInteger method kinda thing.
Thanks guys!!
Thanks guys!!
ISNUMERIC is a boolean property which will return 1 if the field contains a number (not specifically an interger though) and 0 if it is not.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Der. I should have read the question more closely. Christian is spot-on.
ASKER
Cool thanks Christian!! = )) thanks duttcom too!!
Hrmm duttcom I also think that true should equal to 1, but somehow in Access they set it to -1.
Why -1? I'm no sure but maybe because it doesn't want to use the positive bits. Hrmm no wait a Boolean is a value type by itself. So it takes one bit I believe. So why when we convert it to a number it uses 2 bits? One bit for sign, one bit for the value. Hrmm I'm not sure. Ok lets ask Christian! (P.S. duttcom, Christian knows EVERYTHING about programming. Hrmm and that's probably an understatement already haha. I'm very fortunate to have him help me out all the way!! = )))) )
Christian! If you don't mind, could you share your thoughts on why true is -1 instead of 1 when I cint it? Seems like Boolean is taking 2 bits!
Hrmm duttcom I also think that true should equal to 1, but somehow in Access they set it to -1.
Why -1? I'm no sure but maybe because it doesn't want to use the positive bits. Hrmm no wait a Boolean is a value type by itself. So it takes one bit I believe. So why when we convert it to a number it uses 2 bits? One bit for sign, one bit for the value. Hrmm I'm not sure. Ok lets ask Christian! (P.S. duttcom, Christian knows EVERYTHING about programming. Hrmm and that's probably an understatement already haha. I'm very fortunate to have him help me out all the way!! = )))) )
Christian! If you don't mind, could you share your thoughts on why true is -1 instead of 1 when I cint it? Seems like Boolean is taking 2 bits!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
WHAO! see duttcom whaddiya say? haha = PP i even need to re-read this and figure out the sub-concepts it covers! benefits of bitwise operations using 16 bit variable (but that's cause i'm at beginner level and soon to be familiar with these concepts!!
(to Christian - reading reading reading reading reading)
hahaha = )) thanks Christian!! let me digest this!! = ))
(to Christian - reading reading reading reading reading)
hahaha = )) thanks Christian!! let me digest this!! = ))
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
cool thanks Christian! i'll go through this again next week!! = ))