---
title: FormatInput
framework: foundation
role: symbol
role_heading: Associated Type
path: foundation/formatstyle/formatinput
---

# FormatInput

The type this format style accepts as input.

## Declaration

```swift
associatedtype FormatInput
```

## Discussion

Discussion Swift type inference uses this value to determine which static accessors are available at a given call point. For example, when you format an Int32, you can use the static number property that provies a IntegerFormatStyle<Int32>, as seen in the following example. This works because the style’s input type IntegerFormatStyle/FormatInput is a BinaryInteger generically constrained to the Int32 type. let perihelionDistanceToSunInKm: Int32 = 147098291 perihelionDistanceToSunInKm.formatted(.number     .notation(.scientific)) // "1.470983E8"

## See Also

### Declaring input and output types

- [FormatOutput](foundation/formatstyle/formatoutput.md)
