Transpose an arbitrarily sized rectangular Matrix.




      INSTALL @lib$+"ARRAYLIB"
 
      DIM matrix(3,4), transpose(4,3)
      matrix() = 78,19,30,12,36,49,10,65,42,50,30,93,24,78,10,39,68,27,64,29
 
      PROC_transpose(matrix(), transpose())
 
      FOR row% = 0 TO DIM(matrix(),1)
        FOR col% = 0 TO DIM(matrix(),2)
          PRINT ;matrix(row%,col%) " ";
        NEXT
        PRINT
      NEXT row%
 
      PRINT
 
      FOR row% = 0 TO DIM(transpose(),1)
        FOR col% = 0 TO DIM(transpose(),2)
          PRINT ;transpose(row%,col%) " ";
        NEXT
        PRINT
      NEXT row%