Difference between revisions of "Array.rotaterows()"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "This function rotates rows in an array with mentioned number of iterations. ==Examples== 1. a=MAGICSQUARE(3) a.rotaterows(2) Output is displayed as: <br/>4 3 8 <br/>2 7 6...")
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
*[[ Z3 | << Z3 Home ]]
 +
*[[ Z%5E3_Language_Documentation | Z3 Language Documentation]]
 +
*[[ Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member Functions]]
 +
 +
 +
==Array.rotaterows(NumberOfSteps)==
 
This function rotates rows in an array with mentioned number of iterations.
 
This function rotates rows in an array with mentioned number of iterations.
  
Line 20: Line 26:
 
<br/> blue yellow
 
<br/> blue yellow
 
<br/> red brown
 
<br/> red brown
 +
 +
==See Also==
 +
[[Array.rotatecolumns() | rotatecolumns]]

Latest revision as of 02:41, 30 April 2020


Array.rotaterows(NumberOfSteps)

This function rotates rows in an array with mentioned number of iterations.

Examples

1.

a=MAGICSQUARE(3)
a.rotaterows(2)

Output is displayed as:
4 3 8
2 7 6
9 5 1


2.

a=[["red","brown"],["green","pink"],["blue","yellow"]];
a.rotaterows(1)

Output is displayed as:
green pink
blue yellow
red brown

See Also

rotatecolumns