Instance Method

scanDouble(_:)

Scans for a double value, returning a found value by reference.

Declaration

func scanDouble(_ result: UnsafeMutablePointer<Double>?) -> Bool

Parameters

doubleValue

Upon return, contains the scanned value. Contains HUGE_VAL or –HUGE_VAL on overflow, or 0.0 on underflow.

Return Value

true if the receiver finds a valid floating-point representation, otherwise false. Overflow or underflow are both considered valid floating-point representations.

Discussion

Skips past excess digits in the case of overflow, so the scanner’s position is past the entire floating-point representation.

Invoke this method with NULL as doubleValue to simply scan past a double value representation. Floating-point representations are assumed to be IEEE compliant.

See Also

Scanning Numeric Values

func scanDecimal(UnsafeMutablePointer<Decimal>?) -> Bool

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

func scanFloat(UnsafeMutablePointer<Float>?) -> Bool

Scans for a float value, returning a found value by reference.

func scanHexDouble(UnsafeMutablePointer<Double>?) -> Bool

Scans for a double value from a hexadecimal representation, returning a found value by reference.

func scanHexFloat(UnsafeMutablePointer<Float>?) -> Bool

Scans for a double value from a hexadecimal representation, returning a found value by reference.

func scanHexInt32(UnsafeMutablePointer<UInt32>?) -> Bool

Scans for an unsigned value from a hexadecimal representation, returning a found value by reference.

func scanHexInt64(UnsafeMutablePointer<UInt64>?) -> Bool

Scans for a long long value from a hexadecimal representation, returning a found value by reference.

func scanInt(UnsafeMutablePointer<Int>?) -> Bool

Scans for an NSInteger value from a decimal representation, returning a found value by reference

func scanInt32(UnsafeMutablePointer<Int32>?) -> Bool

Scans for an int value from a decimal representation, returning a found value by reference.

func scanInt64(UnsafeMutablePointer<Int64>?) -> Bool

Scans for a long long value from a decimal representation, returning a found value by reference.

func scanUnsignedLongLong(UnsafeMutablePointer<UInt64>?) -> Bool

Scans for an unsigned long long value from a decimal representation, returning a found value by reference.