|
|
|
|
|
|
|
Figure 13-1
A Two-Dimensional Array |
|
|
|
|
|
|
|
|
This example declares alpha to be a two-dimensional array, all of whose components are float values. The declaration creates the array that was pictured in Figure 13-1. |
|
|
|
|
|
|
|
|
To access an individual component of the alpha array, two expressions (one for each dimension) are used to specify its position. Each expression is in its own pair of brackets next to the name of the array: |
|
|
|
|
|
|
|
|
The syntax template for accessing an array component is |
|
|
|
|
|