---
title: "discreteInput(after:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/discreteformatstyle/discreteinput(after:)"
---

# discreteInput(after:)

The next discretization boundary after the given input.

## Declaration

```swift
func discreteInput(after input: Self.FormatInput) -> Self.FormatInput?
```

## Return Value

Return Value For most inputs, the method returns the “smallest” value “greater” than input for which the style produces a different FormatOutput, or nil if no such value exists. For some input values, the function may also return a value “greater” than input for which the style still produces the same FormatOutput as for input.

## Discussion

Discussion Use this function to determine the next “greater” input that warrants updating the formatted output. The following example prints all possible outputs the format style can produce upwards starting from the startInput: var previousInput = startInput while let nextInput = style.discreteInput(after: previousInput) {     print(style.format(nextInput))     previousInput = nextInput }
