silentzilch 发表于 2015-4-10 02:22 
感谢您的回答!
但是我想实现的是输入任意一串数据然后进行排列的macro,而非单纯实现例子中的矩阵,还请 ...
%macro test(list=);
%let n=%eval(%sysfunc(count(&list,%str( )))+1);
data test;
array v {&n};
array tmp {&n} _temporary_ (&list);
do i=1 to &n;
do j=1 to &n;
v(j)=tmp(abs(j-i)+1);
end;
output;
end;
drop i j;
run;
%mend;
%test(list=16 8 4 2)
%test(list=4 8 12 900 88)
%test(list=1 2 3 4 5 6 7)