Operator

# :

<div class="rst-class">

forsearch

</div>

:

<div class="rst-class">

forsearch

</div>

Pair

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

The ":" is used to assign values to the Left and Right properties of a `Pair</api/language/pair>` in a `Var</api/language/var>` statement.

## Usage

``` xojo
Var p As Pair = value1 : value2 [ : value3 :... valueN ]
```

| Part        | Type                               | Description                                                                               |
|-------------|------------------------------------|-------------------------------------------------------------------------------------------|
| p           | `Pair</api/language/pair>`         | The `Pair</api/language/pair>` instance that contains the assigned Left and Right values. |
| value1      | `Variant</api/data_types/variant>` | The value of the Left property in the `Pair</api/language/pair>`.                         |
| value2      | `Variant</api/data_types/variant>` | The value of the Right property in the `Pair</api/language/pair>`.                        |
| value 3...N | `Variant</api/data_types/variant>` | Optional values, used to create a singly-linked list among pairs.                         |

## Notes

The syntax for the `Pair</api/language/pair>` declaration requires that the Left and Right properties be passed in this manner.

## Sample code

The following `Var</api/language/var>` statement creates a `Pair</api/language/pair>` instance:

``` xojo
Var p As Pair = 1 : 2
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The following `Var</api/language/var>` statement creates a singly linked list.

``` xojo
Var p As Pair = 1 : 2 : 3: 4 : 5
```

<div class="important">

<div class="title">

Important

</div>

The linked-list Pair syntax is not supported with Android.

</div>

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Pair</api/language/pair>` class; `Operator precedence</api/language/operators/operator_precedence>`

</div>
