Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
Sub Main()
|
||||
Dim d As Double ' 8 Bytes, type specifier = #
|
||||
Dim s As Single ' 4 Bytes, type specifier = !
|
||||
d = -12.3456
|
||||
d = 1000#
|
||||
d = 0.00001
|
||||
d = 67#
|
||||
d = 8.9
|
||||
d = 0.33
|
||||
d = 0#
|
||||
d = 2# * 10 ^ 3
|
||||
d = 2E+50
|
||||
d = 2E-50
|
||||
s = -12.3456!
|
||||
s = 1000!
|
||||
s = 0.00001!
|
||||
s = 67!
|
||||
s = 8.9!
|
||||
s = 0.33!
|
||||
s = 0!
|
||||
s = 2! * 10 ^ 3
|
||||
End Sub
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
Option Explicit
|
||||
Public Declare Function RtlCompareMemory Lib "ntdll.dll" _
|
||||
(ByRef Source1 As Any, ByRef Source2 As Any, ByVal Length As Long) As Long
|
||||
|
||||
Public Function IsNAN(ByRef d As Double) As Boolean
|
||||
Dim d1 As Double
|
||||
d1 = NaN()
|
||||
IsNAN = (RtlCompareMemory(d, d1, 8) = 8)
|
||||
End Function
|
||||
|
||||
Public Function NaN() As Double
|
||||
On Error Resume Next ' ignore the error
|
||||
NaN = 0 / 0
|
||||
End Function
|
||||
|
||||
Sub Main()
|
||||
Dim d1 As Double
|
||||
Dim d2 As Double
|
||||
d1 = NaN()
|
||||
d2 = d1
|
||||
Debug.Assert IsNAN(d2)
|
||||
Debug.Print CStr(d2)
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue