# Array subscripts in Fortran202x

**URL:** <https://fortran-lang.discourse.group/t/array-subscripts-in-fortran202x/3876>\
**Category:** Language enhancement\
**Created:** [June 30, 2022, 10:08pm UTC](https://fortran-lang.discourse.group/t/array-subscripts-in-fortran202x/3876 "2022-06-30T22:08:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![han190](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/han190/32/7158_2.png) [@han190](https://fortran-lang.discourse.group/u/han190)\
**Post date:** [June 30, 2022, 10:08pm UTC](https://fortran-lang.discourse.group/t/array-subscripts-in-fortran202x/3876/1 "2022-06-30T22:08:14Z")

</div>

In section 8 of [the new features of Fortran 202x](https://wg5-fortran.org/N2151-N2200/N2194.pdf), array subscripts could be written as

```fortran
integer :: idx(2)
idx = [4, 7]
arr(@idx) ! Equivalent to arr(4, 7)

```

I have no idea compiler-wise how hard it is to implement, but **will coindices apply to the same rule?** It will be nice if we can do something like the following:

```fortran
integer :: idx(2), coidx(2)
idx = [4, 7]
coidx = [1, 8]
arr(@idx)[@coidx] ! Equivalent to arr(4, 7) [1, 8]

```
