# Tuples (Base Types)

**URL:** <https://discourse.ats-lang.org/t/tuples-base-types/865>\
**Category:** Documentation\
**Tags:** types, basetypes\
**Created:** [September 1, 2016, 1:43am UTC](https://discourse.ats-lang.org/t/tuples-base-types/865 "2016-09-01T01:43:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![steinwaywhw](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/steinwaywhw/32/2_2.png) [@steinwaywhw](https://discourse.ats-lang.org/u/steinwaywhw)\
**Post date:** [September 1, 2016, 1:43am UTC](https://discourse.ats-lang.org/t/tuples-base-types/865/1 "2016-09-01T01:43:12Z")

</div>

The following examples show tuple values and their tuple types.

```nohighlight
val t1 = @("I'm a flat tuple", 42, true): @(string, int, bool)
val t2 = ("I'm a flat tuple", 42, true): @(string, int, bool)
val t3 = $tup("I'm a boxed tuple", 42, true): $tup(string, int, bool)
val t4 = '("I'm a boxed tuple", 42, true): $tup(string, int, bool)

```

And to access each part of a tuple, use 0-based index, or pattern matching as follows

```auto
val t = @("I'm a flat tuple", 42, true)
val @(x, y, _) = t
val _ = assertloc (t.0 = x)

```
