Literals/Floating point: Difference between revisions
Content added Content deleted
(→=={{header|Visual Basic}}==: added Visual Basic example) |
|||
Line 1,312: | Line 1,312: | ||
Note that there must always be at least one digit before and after the period (and for the exponent). |
Note that there must always be at least one digit before and after the period (and for the exponent). |
||
=={{header|Visual Basic}}== |
|||
{{works with|Visual Basic|5}} |
|||
{{works with|Visual Basic|6}} |
|||
{{works with|VBA|Access 97}} |
|||
{{works with|VBA|6.5}} |
|||
{{works with|VBA|7.1}} |
|||
<lang vb>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</lang> |
|||
=={{header|XPL0}}== |
=={{header|XPL0}}== |