Initializer

init(decimal:)

Initializes a decimal number to represent a given decimal.

Declaration

init(decimal dcm: Decimal)

Parameters

decimal

The value of the new object.

Return Value

An NSDecimalNumber object initialized to represent decimal.

Discussion

This method is the designated initializer for NSDecimalNumber.

See Also

Initializing a Decimal Number

init(mantissa: UInt64, exponent: Int16, isNegative: Bool)

Initializes a decimal number using the given mantissa, exponent, and sign.

init(string: String?)

Initializes a decimal number so that its value is equivalent to that in a given numeric string.

init(string: String?, locale: Any?)

Initializes a decimal number so that its value is equivalent to that in a given numeric string, interpreted using a given locale.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software