some_integer = 97.45 * 1#
what does this notation mean? what will some_integer = ?
some_integer = 97.45 * 1#
what does this notation mean? what will some_integer = ?
1#
means that 1 is evaluated as a double.
I doubt that would make any difference to that calculation though. The calculation would still give 97.45 if 1 was undecorated and thus treated as an integer. And when the result of the calculation is assigned to the the integer some_integer
it will be 97.
Sub Macro1()
Dim i As Integer
i = 97.45 * 1#
MsgBox (i) 'Shows 97
End Sub
1#
means "1 as a double". Of course, if some_integer is an integer, then the non-integer portions of the resulting expression will be truncated to 97 (and thus I am confused what it is doing in this case).
INFO: Type Declaration Character to Data Type Chart (in VBA)
some_integer will be 97.45.
It's used to treat 1 as a double rather than any other type. (E.G 1 can be treated as an integer, but in this case we want to treat 1 as a double)
You can think of it as some_integer = 97.45 * 1#
as benig the same as some_integer = 97.45 * 1.00