Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Test-integerness/FreeBASIC/test-integerness.basic
Normal file
12
Task/Test-integerness/FreeBASIC/test-integerness.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#define isInteger(x) iif(Int(val(x)) = val(x), 1, 0)
|
||||
|
||||
Dim As String test(1 To 8) = {"25.000000", "24.999999", "25.000100", "-2.1e120", "-5e-2", "NaN", "Inf", "-0.05"}
|
||||
|
||||
For i As Integer = 1 To Ubound(test)
|
||||
Dim As String s = test(i)
|
||||
|
||||
Print s,
|
||||
If isInteger(s) then Print "is integer" Else Print "is not integer"
|
||||
Next i
|
||||
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue