@@ -7,6 +7,7 @@ cat(' * <a href="array-size-and-dimension-function.html">Array Size and Dimensio
77cat(' * <a href="array-broadcasting.html">Array Broadcasting</a>\n')
88cat(' * <a href="array-concatenation.html">Array Concatenation</a>\n')
99cat(' * <a href="sorting-functions.html">Sorting functions</a>\n')
10+ cat(' * <a href="reversing-functions.html">Reversing Functions</a>\n')
1011}
1112```
1213
@@ -334,7 +335,7 @@ Any mismatches will cause an error to be thrown.
334335 x3 = append_array(x1, x2);
335336```
336337
337- ## Sorting functions {#sorting-functions}
338+ ## Sorting Functions {#sorting-functions}
338339
339340Sorting can be used to sort values or the indices of those values in
340341either ascending or descending order. For example, if ` v ` is declared
@@ -409,3 +410,21 @@ Number of components of v less than v[s]
409410` int ` ** ` rank ` ** ` (int[] v, int s) ` <br >\newline
410411Number of components of v less than v[ s]
411412
413+ ## Reversing Functions {#reversing-functions}
414+
415+ Reversing allows to create a copy of array in which elements are in reverse
416+ order. For example, if ` v ` is declared as a real array of size 3, with values
417+ \[ \text{v} = (1,\, -10.3,\, 20.987), \] then
418+ \[ \mathrm{reverse(v)} = (20.987,\, -10.3,\, 1). \]
419+
420+ <!-- real[]; reverse; (real[] v); -->
421+ \index{{\tt \bfseries reverse }!{\tt (real[ ] v): real[ ] }|hyperpage}
422+
423+ ` real[] ` ** ` reverse ` ** ` (real[] v) ` <br >\newline
424+ Create a copy of the array with the elements in reverse order.
425+
426+ <!-- int[]; reverse; (int[] v); -->
427+ \index{{\tt \bfseries reverse }!{\tt (int[ ] v): int[ ] }|hyperpage}
428+
429+ ` int[] ` ** ` reverse ` ** ` (int[] v) ` <br >\newline
430+ Create a copy of the array with the elements in reverse order.
0 commit comments