IsNumber (Text As String) As Boolean
Tests whether the specified string can be safely parsed as a number.
B4J Question isNumber("1f") =>> TRUE !! - Tayfur    
Dec 24, 2016" returned TRUE !!!!
why?
If IsNumber("1f") Then Log("f")' return f
If IsNumber("ff") Then Log("a")'------
If IsNumber("1ff") Then Log...
link:
Sub TestNumber(s As String) As Boolean
Return IsNumber(s) And Regex.IsMatch("+"...
link: Try something like this:
Dim x As String = "1d"
If IsNumber(x) Then
Log...
link: a different verison or parameter (isNumber)?
I want to simple check for number....
B4A Question isNumber and cell phone number - peacemaker    
Nov 1, 2018 the database, but isNumber function = True.
Trouble is that SMS cannot be sent to a number "41...", "+41..." is required.
Any ideas to solve ?
Noting this post, maybe:
Sub isNumber3...
link: string, otherwise IsNumber tells you if is a number or anything else...
link: must be String type (for preserving +), but isNumber formally.
How to detect correctly ?...
link: IMHO, isNumber correctly returns True for "+41987654321" because the plus sign indicates...
B4i Question IsNumber to work on hexstrings? - techknight    
Apr 14, 2015 a length, its whatever the text is. Such as any combination of letters and numbers.
Is there a way to test that the string has all valid hexadecimal letters/numbers?...
link: Huh. Learn something new everyday, I never used it in VB6, at least I dont recall....
link: Regex exist in all programming language
Regex in basic is easy.
Use my example code in above post...
link: Well I dont program in any other language except BASIC, and regex doesnt really exist in BASIC excep...
Wish IsNumber function - Daestrum (first post)    
Aug 6, 2021@Sandman I don't disagree, with the addition of the "(1).As()" syntax they become obso...
link: This is indeed a bug. It will be fixed....
link: . I think it's entirely fair to assume that the current behaviour of IsNumber simply is an oversight...
link: 1f and 1d are valid numbers (java syntax for 1 as a float and 1 as a double)...
B4A Question IsNumber function fault - yeroen (first post)    
Aug 5, 2021
You should make a post in the wishlist forum.
ok i will...
link:
So I mean: Can the IsNumber function be changed in a next update?
You should make a post in...
link:
Please use code here... tags when posting code.
Which problem are you referring to?
The IsNumber...
link: .b4x.com/android/forum/threads/isnumber-1f-true.74477/post-472841
You solved it there, with the code...
B4A Question IsNumber ok.. but what about IsDecimal - Erel (first post)    
Sep 25, 2015   
(3 reactions)What exactly are you trying to check with IsDecimal? Do you want to test whether the number is a whole number or not?
You can use this code:
Sub IsDecimal(s As String) As Boolean
Return IsNumber(s) And Floor(s) = s
End Sub
...
link: try
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For ex...
link: I can find if an entered text is number with IsNumber function . What about IsDecimal ?...
B4A Question IsNumber(string) question - Erel (first post)    
Sep 24, 2015Please start a new thread for this question....
link: What about IsInteger ? or IsDecimal ?...
link: Thinking better...
I had the need to know if a variable is numeric, not its value. In this case I ...
link: How about:
Sub IsNumeric(Var As Object) As Boolean
Try
Var = Var * 1
Return Tru...
B4A Question IsNumber( with commas? - Mitch (first post)    
Aug 22, 2013Thanks!...
link: txtTest.Text="55,555"
If IsNumber(txtTest.Text.Replace(",","")) Then...
link: IsNumber(55555) = true
IsNumber(55,555) = false
I'm using an editText view, not numerics...
B4A Question IsNumber bug? - MotoMusher (first post)    
Aug 1, 2013Thank you both....
link: the value as if it is written in exponent notation.
You can use this workaround:
Sub IsNumber2...
link: It seems it gets confused with an HEX number or something when having an "E"...
link: it is a number:
Dim z As String = "SHE7150"
If IsNumber(z) = True Then
Msgbox...
B4A Question If IsNumber not working - Bryan (first post)    
Mar 8, 2013I had done it like that. Received same errors. Reason I have Main.lc.SetVariableAndValue("test_...
link: Change this line:
Main.lc.SetVariableAndValue(Main.test_1, "256")
To:
Main.lc.SetVari...
link: I'll try to make this as simple as I can by taking out parts of the code that is unrelated to th...
link: This just crashes the service also.
Which error do you get in the logs?...
Page: 1  
2  
3  
4  
5  
6  
7