BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Linlin
Lapis Lazuli | Level 10

Sure!

robertrao
Quartz | Level 8

Hi Team,

I have this code while reading the paper 242-30 (Arrays made easy) and want to know whats the meaning of i=1

this code was explained for common errors and muisunderstandings so dont worry too much about :do until (i gt 24);

data dailytemp;

set tempdata;

array temperature_array {24} temp1-temp24;

array celsius_array {24} celsius_temp1-celsius_temp24;

do until (i gt 24);

i = 1;                                                                   /*referring to this line of the code*/

celsius_array{i} = 5 / 9 * (temperature_array{i} – 31);

end;

i=0;

drop i;

run;

Thanks

art297
Opal | Level 21

Something is missing from the code .. i never gets incremented.

You really should start a new discussion when you have a new question.

When you do, post all of the code.  i=1 simply sets a variable called i to the value of 1.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 17 replies
  • 3664 views
  • 6 likes
  • 4 in conversation