13: Single Dimension Arrays
- Page ID
- 54222
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
- 13.1: Introduction
- An array is a collection or set of data. The type (i.e., integer, real, etc.) of each item in the array must be the same.
- 13.2: Array Declaration
- An array must be declared before use. The type of the array is defined followed by the size or dimension.
- 13.3: Accessing Array Elements
- To access elements in an array, the array name and an index must be specified.
- 13.4: Implied Do-Loop
- An implied do-loop is a special form of a loop that can be performed on one line.
- 13.5: Intrinsic Functions
- There are a number of intrinsic, or built-in, functions that can be used for arrays.
- 13.6: Initializing Arrays
- An array can be initialized when it is declared.
- 13.7: Example
- In this example we will write a Fortran program to read a series of numbers from a file and compute some statistical information including minimum, maximum, sum, average, and standard deviation.
- 13.8: Arrays of Strings
- An array may also contain characters or strings.