Instance Method

scanHexDouble:

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

Declaration

- (BOOL)scanHexDouble:(double *)result;

Parameters

result

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

Return Value

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

Discussion

This corresponds to %a or %A formatting. The hexadecimal double representation must be preceded by 0x or 0X.

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 result to simply scan past a hexadecimal double representation.

See Also

Scanning Numeric Values

- scanDecimal:

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

- scanDouble:

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

- scanFloat:

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

- scanHexFloat:

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

- scanHexInt:

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

- scanHexLongLong:

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

- scanInteger:

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

- scanInt:

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

- scanLongLong:

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

- scanUnsignedLongLong:

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

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