# `type.ordering_operand`

Values cannot be ordered.

Area 3, [Logic](../topics/logic.md); not declinable; the next step is usually the agent's.

A nullable value has to be matched before it can be compared:

```jadpo
type Count = Int {}

type Flag = Bool {}

function over_maximum(count: Count?, maximum: Count) -> Flag {
    return Flag(count > maximum)
}
```

```text
error: `count` may be `none`, so it can't be ordered
 --> main.jadpo:6:17
  |
6 |     return Flag(count > maximum)
  |                 ^^^^^ may be `none`
  reason: `count` is `Count?`; `<`, `<=`, `>` and `>=` order two values, and `none` has no place in an order.
  next: Match on `count` and compare inside `some(...)` (agent)
  rule: type.ordering_operand
  help: https://jadpo.dev/docs/errors/type.ordering_operand

check failed: 1 error, 1 file
```
