## How to produce a reverse of a vector in Fortran?

Let's we have a vector A, e.g.

```
A = [1,2,3,4,5]
```

How to produce a vector with reverse indices, e.g.

```
B = [5,4,3,2,1]
```

The answer is this:

```
B = A( size(A):1:-1 )
```

To reverse A itself do

```
A = A( size(A):1:-1 )
```