# RoundTripSFI class
{: .no_toc }

Converts a number to a **Double** and returns its text for the **R** identifier.

**RoundTripSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](/tB/Packages/Contributed/Fmt/IStringFormatIdentifier.md) and matches the identifier **R** or **r** in any case. [**StringHelper**](/tB/Packages/Contributed/Fmt/StringHelper.md) registers it, so `{0:R}` in a call to [**StringFormat**](/tB/Packages/Contributed/Fmt/PublicEntryPoints/StringFormat.md) uses it for a numeric value. The class is predeclared, and its two members are reached through the interface.

## Output

The value is converted with **CDbl**, and the **Double** is converted to a **String** by the ordinary conversion. A precision is ignored. The ordinary conversion keeps at most 15 significant digits, so a value that needs more digits does not survive the round trip, in spite of the identifier's name. A numeric **String** is accepted and returned as a number, without trailing zeros. The decimal point follows the Windows regional settings.

```tb check_build check_run
Debug.Print StringFormat("{0:R}", 0.1)     ' 0.1
Debug.Print StringFormat("{0:R}", 1 / 3)   ' 0.333333333333333
Debug.Print StringFormat("{0:R}", "1.50")  ' 1.5
```

## Members

- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/identifier.md) is `R` or `r`.
- **GetFormattedValue** returns the value converted as described above.

Both are implemented as private members of the interface.

## See Also

- [IStringFormatIdentifier](/tB/Packages/Contributed/Fmt/IStringFormatIdentifier.md) interface -- the contract every format identifier class implements
- [FixedPointSFI](/tB/Packages/Contributed/Fmt/FixedPointSFI.md) class -- a fixed number of decimal places
- [StringFormat](/tB/Packages/Contributed/Fmt/PublicEntryPoints/StringFormat.md) function -- formats a string using the identifiers
- [Fmt package](/tB/Packages/Contributed/Fmt/index.md) -- overview, with the table of identifiers
