---
title: numericType
framework: swift
role: symbol
role_heading: Instance Property
path: swift/unicode/scalar/properties-swift.struct/numerictype
---

# numericType

The numeric type of the scalar.

## Declaration

```swift
var numericType: Unicode.NumericType? { get }
```

## Discussion

Discussion For scalars that represent a number, numericType is the numeric type of the scalar. For all other scalars, this property is nil. let scalars: [Unicode.Scalar] = ["4", "④", "⅕", "X"] for scalar in scalars {     print(scalar, "-->", scalar.properties.numericType) } // 4 --> Optional(Swift.Unicode.NumericType.decimal) // ④ --> Optional(Swift.Unicode.NumericType.digit) // ⅕ --> Optional(Swift.Unicode.NumericType.numeric) // X --> nil This property corresponds to the “Numeric_Type” property in the Unicode Standard.
