Fixed64 Data Type

Holds signed 64-bit (8-byte) fixed-point values with a default range −922,337,203,685,477.5808 – +922,337,203,685,477.5807.

Instructions

Default value
When you declare a variable of type Fixed64 and do not initialize it, its default value is zero (¤0.0).
Automatic conversions
Fixed64 widens to Real32, Real64, Real128, or Fixed128 without risk of overflow.
Type characters
If you add the character «@» to the end of a variable name, the variable has the type Fixed64.

Fixed64 literal

@ [ symbol ] integer_part [ . fractional_part ]
or
¤ integer_part [ . fractional_part ]

Parts

symbol
Optional one character. Some permitted symbols are: $, , £, and ¥.
these symbols are ignored by the compiler. If you use a symbol, use the same one in all of your code.
integer_part
One to 18 decimal digits. For the default number of decimal digits, the maximum is 15 digits. You can use an underscore (_) to divide it into groups of digits.
fractional_part
One to 18 decimal digits. For the default number of decimal digits, the maximum is 4 digits. All digits after that are ignored.

Constructors

Fixed64(Optional digits As Int32 = 4)
digits specifies the number of digits to the right of the decimal point. It must be between 1 and 19. The default is 4.

Shared methods and properties

Fixed64.Default As Fixed64
Returns the default value, ¤0.0.
Fixed64.Epsilon(Optional x As Fixed64) As Fixed64
Returns the smallest value more than ¤0.0. If x is not given, it returns ¤0.0001
Fixed64.Max(Optional x As Fixed64) As Fixed64
Returns the largest positive value for x. If x is not given, it returns ¤922_337_203_685_477.5807
Fixed64.Min(Optional x As Fixed64) As Fixed64
Returns the smallest negative value for x. If x is not given, it returns −¤922_337_203_685_477.5808
Fixed64.Parse(str As String, Optional #format As Format) As Fixed64
Tries to parse a string that shows as a number.
If #format is not given or is #Null, it uses the format of the local culture. Or you can make it clear with Format.UserLocale.
Fixed64.Size As Int32
Returns the number of available bytes. This is always 8.

Examples

Dim price As Fixed64 = @$1_199.99
Dim price@ = @$1_199.99

See also