SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Processing Variables with Arrays
Creating Multidimensional Arrays


Question: When the nested DO loop executes, the index variable j is set to 1. Which array element is referenced by m(i,j)?


data finance.quarters(drop=i j); set finance.monthly; array m(4,3) month1-month12; array Qtr(4); do i=1 to 4; qtr(i=0); do j=1 to 3; qtr(i)+m(i,j); end; end; run;
Table Representation of m Array
Month1 Month2 Month3
Month4 Month5 Month6
Month7 Month8 Month9
Month10 Month11 Month12

           

  back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement