---
title: "scanDecimal(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/scanner/scandecimal(_:)"
---

# scanDecimal(_:)

Scans for an NSDecimal value, returning a found value by reference.

## Declaration

```swift
func scanDecimal(_ dcm: UnsafeMutablePointer<Decimal>?) -> Bool
```

## Parameters

- `dcm`: Upon return, contains the scanned value. See the doc://com.apple.foundation/documentation/Foundation/NSDecimalNumber class specification for more information about NSDecimal values.

## Return Value

Return Value true if the receiver finds a valid NSDecimal representation, otherwise false.

## Discussion

Discussion Invoke this method with NULL as decimalValue to simply scan past an NSDecimal representation.

## See Also

### Scanning Numeric Values

- [scanDouble(_:)](foundation/scanner/scandouble(_:).md)
- [scanFloat(_:)](foundation/scanner/scanfloat(_:).md)
- [scanHexDouble(_:)](foundation/scanner/scanhexdouble(_:).md)
- [scanHexFloat(_:)](foundation/scanner/scanhexfloat(_:).md)
- [scanHexInt32(_:)](foundation/scanner/scanhexint32(_:).md)
- [scanHexInt64(_:)](foundation/scanner/scanhexint64(_:).md)
- [scanInt(_:)](foundation/scanner/scanint(_:).md)
- [scanInt32(_:)](foundation/scanner/scanint32(_:).md)
- [scanInt64(_:)](foundation/scanner/scanint64(_:).md)
- [scanUnsignedLongLong(_:)](foundation/scanner/scanunsignedlonglong(_:).md)
