# chaining comparison {#chaining-comparison}

**Parent topic:**[Operators](../../../Programming/Operators/Operators.md)

## Syntax {#syntax}

&lt;, &lt;=, &gt;, &gt;=, ==, !=, and &lt;&gt; can be used together in one line.

## Arguments {#arguments}

The arguments can be scalar/pair/vector/matrix/set. If one of the arguments is a pair/vector/matrix, the other is a scalar or a pair/vector/matrix of the same size.

## Examples {#examples}

```
1<2<=3.5;
// output: 1

NULL<1<3>=2<3!=1>=NULL;
// output: 1

1<3>1==2<3!=1;
// output: 0

1 2 3 >=2 ==1 2 3;
// output: [0,1,0]

1 2 3 <= 3 2 2 > 2 1 2;
// output: [1,1,0]
```

