Skip to main content

6.4) Understanding Arrays (cont’d)


We can write this same bit of code by using an array. We know we want three variables to represent the three heights so we will declare an array that can hold a maximum of three values as:

real :: person(3)

When declaring as real, 3 represents the total number of variables needed.