D
DK
Observe the following snippet of code and see if you can explain why
it happens.
Dim sAnything as Single
sAnything = 31.308
If sAnything > 31.308 then
msgbox "value greater"
else
msgbox "value less or equal"
endif
Why does this code always go thru the "value greater" portion?
changing the IF condition to If sAnything > CSng(31.308) then it
behaves as expected but why?
it happens.
Dim sAnything as Single
sAnything = 31.308
If sAnything > 31.308 then
msgbox "value greater"
else
msgbox "value less or equal"
endif
Why does this code always go thru the "value greater" portion?
changing the IF condition to If sAnything > CSng(31.308) then it
behaves as expected but why?