# Comparison C Sequence Functions

> The following comparison C functions take two input sequences, left and right, and produce the boolean result sequence result .

> If the two input sequence arguments are of different lengths the operation will be performed on only the number of elements in the shorter of the two sequences.

> The function signatures are of the following form:

>         MCO_RET mco_seq_operator_TYPE(mco_seq_iterator_h result,
>                 mco_seq_iterator_h left,
>                 mco_seq_iterator_h right);

> where TYPE is one of the types listed in the Analytics Functions page and operator is one of the following:

> mco_seq_eq_TYPE() | The element of the result sequence is `true` for corresponding elements that are equal in the left and right sequences; otherwise `false`
> mco_seq_ne_TYPE() | The element of the result sequence is `true` for corresponding elements that are not equal in the left and right sequences; otherwise `false`
> mco_seq_gt_TYPE() | The element of the result sequence is `true` for corresponding elements where the left element is greater than the right; otherwise `false`
> mco_seq_ge_TYPE() | The element of the result sequence is `true` for corresponding elements where the left element is greater than or equal to the right; otherwise `false`
> mco_seq_lt_TYPE() | The element of the result sequence is `true` for corresponding elements where the left element is less than the right; otherwise `false`
> mco_seq_le_TYPE() | The element of the result sequence is `true` for corresponding elements where the left element is less than or equal to the right; otherwise `false`

> ## Example

> Following is an example code snippet demonstrating a comparison operator function:

>         {
>             mco_trans_h trans;
>             mco_cursor_t quote_cursor;
>             Quote quote;
>             mco_seq_iterator_t high_iterator, low_iterator, result_iterator;
>             MCO_RET rc;
>             ...

>             for (rc = mco_cursor_first(trans, &quote_cursor);
>                 rc != MCO_S_CURSOR_END;
>                 rc = mco_cursor_next(trans, &quote_cursor))
>             {
>                 Quote_from_cursor(trans, &quote_cursor, &quote);
>                 Quote_high_iterator(&quote, &high_iterator);
>                 Quote_low_iterator(&quote, &low_iterator);
>                 ...
>                 rc = mco_seq_eq_float(&result_iterator, &low_iterator, &high_iterator);

>                 ...
>             }
>             ...
>         }