@randomman wrote:
I understood it "arranges the variables in a two-dimensional array structure {3,2} with 3 rows and 2 columns, where the variables are placed in row-column order."
this part.
But, I didn't understand why the array looked like structure {1,6} not {3,2} in the result when I printed temp.
The array statement does NOT "arrange" (as in physically store) variables. It does nothing more than to provide you a handy way to refer to variables using an index (in your case a 2-dimensional index). Those variables could be pre-existing variables that are not even contiguous in memory or storage. In fact, you could assign a collection of variables to multiple arrays, with different index structures, and it wouldn't matter to the PUT statement. The PUT statement merely finds where the variables are in storage (based on the variable name) and prints them in a sequential list.
... View more