GiD - The personal pre and post processor

reverse

objarray reverse <obj> ?<blocksize>?

Reverse the order of the array.

<obj> the objarray to be reversed

<blocksize> optional integer >=1 and <=num items, to reverse by blocks of this size.

Warning: the values of <obj> itself are modified, without creating another copy of the object

e.g.

set obj [objarray new doublearray -values {3.5 2.1 0.3 3.5 2.6 0.3}] -> 3.5 2.1 0.3 3.5 2.6 0.3 objarray reverse $obj -> 0.3 2.6 3.5 0.3 2.1 3.5 # reverse again but as blocks of 2 items objarray reverse $obj 2 -> 2.1 3.5 3.5 0.3 0.3 2.6

COPYRIGHT © 2022 · GID · CIMNE