First slot: 19.234
The program starts by creating the array and putting 19.234 into the first slot:
DIM VALUE(1 TO 5) ' Ask for an array of floating point numbers LET VALUE(1) = 19.234 ' Put data into the first slot of the array
Here is what the array looks like at this point:
19.234 |
0.0 |
0.0 |
0.0 |
0.0 |
1 |
2 |
3 |
4 |
5 |
All the slots of the array will have some value. If you do not explicitly put something into a slot, it will contain a zero.
What does the following program write out to the monitor?
DIM VALUE(1 TO 5) ' Ask for an array of floating point numbers LET VALUE(1) = 19.234 ' Put data into the first slot of the array PRINT "First slot:", VALUE(1) ' Print out the first slot PRINT "Next slot:", VALUE(2) ' Print out the next slot END