Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/1896-standardlibrary-generic-ckeyvaluepair-ckeyvaluepaircompare.md
T
2026-06-23 21:47:51 +08:00

655 B

Compare

Compares the current key/value pair to the specified one.

int Compare(
   CKeyValuePair<TKeyTValue>*  pair     // the pair to compare
   );

Parameters

*pair

[in]  The pair to compare.

Return Value

Returns a number that expresses the ratio of the current and passed key-value pairs:

  • if the result is less than zero, the current key/value pair is less than the passed one
  • if the result is zero, the current key/value pair is equal to than the passed one
  • if the result is greater than zero, the current key/value pair is greater than the passed one

Note

Key/value pairs are compared based on their keys.