c*******7 发帖数: 2506 | 1 SCORE was defined as a numeric array/
I want to sum some of the elements of the array, like
TOTAL=SUM(OF SCORE{1}-SCORE{14});
but it did not work.
How should I modify it?
Thanks. | w*****e 发帖数: 806 | 2 TOTAL=SUM(OF SCORE{1}-- SCORE{14})会有用吗??
~~~用2个- 代替1个- | c*******7 发帖数: 2506 | 3 Tired. Still got the same eror.
ERROR 22-322: Syntax error, expecting one of the following: a name, ), ','.
【在 w*****e 的大作中提到】 : TOTAL=SUM(OF SCORE{1}-- SCORE{14})会有用吗?? : ~~~用2个- 代替1个-
| D******n 发帖数: 2836 | 4 %macro test;
data a2;
set a1;
array score (14) abc--dde;
total = sum(of
%do i=1 %to 14;
score(&i)
%end;
);
run;
%mend;
%test | A****t 发帖数: 141 | |
|