<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFComparisonResult",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@E@CFComparisonResult"
  },
  "title" : "CFComparisonResult"
}
-->

# CFComparisonResult

Constants returned by comparison functions, indicating whether a value is equal to, less than, or greater than another value.

```
enum CFComparisonResult
```

## Topics

### Constants

[`CFComparisonResult.compareLessThan`](/documentation/CoreFoundation/CFComparisonResult/compareLessThan)

Returned by a comparison function if the first value is less than the second value.

[`CFComparisonResult.compareEqualTo`](/documentation/CoreFoundation/CFComparisonResult/compareEqualTo)

Returned by a comparison function if the first value is equal to the second value.

[`CFComparisonResult.compareGreaterThan`](/documentation/CoreFoundation/CFComparisonResult/compareGreaterThan)

Returned by a comparison function if the first value is greater than the second value.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)