Integer :: I ! counter for Do loop Real, Dimension(-5:4) :: Temp !Initialize to 0 Do I = -5, 4, 1 Temp(I) = 0.0 End Do !Equivalent but more risky !Use the first method. this is only for ``macho'' programmers. ! Do I = 1, 10 ! Temp(I - 6) = 0.0 ! End Do
Method 2:
Integer, Dimension(5) :: Marks Marks = (/0, 0, 0, 0, 0/)
Other methods in Pass 2.