/* Transpose matrix A, result at B. */ transpose: procedure (a, b); declare (a, b) (*,*) float controlled; declare (m, n) fixed binary; if allocation(b) > 0 then free b; m = hbound(a,1); n = hbound(a,2); allocate b(n,m); do i = 1 to m; b(*,i) = a(i,*); end; end transpose;