next up previous contents
Next: 2.3.9 Operation Element: SetDims Up: 2.3 The FileStructure Section Previous: 2.3.7 Operation Element: SetValue   Contents


2.3.8 Operation Element: AddValue

When reading a file, the AddValue element indicates that the data read should be added to an array. When writing a file, the AddValue element indicates that the software should loop through the array, retrieve the next value, and write that value to a file.

To create a general representation of arrays with arbitrary numbers of dimensions and dimensional sizes, it is necessary that all arrays be mapped to an equivalent one-dimensional array while reading and writing. Consecutive calls to AddValue will access items in the array by iterating over the end dimension first, the end-1 dimension second, and so on. For a 3x4 array, consecutive calls to AddValue while reading would set the array values in the following order: a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34.

The AddValue element has the following attribute:
Attribute Name Description Required
target The name of the array to which this value should be added or from which should be written yes

The AddValue element contains no other elements.

$\textstyle \parbox{6.3in}{\textcolor{blue}
{\textbf{Example \hrulefill}}\\
\pa...
...should be added to the
array named \lq\lq AUXOUT''
\\ \textcolor{blue}{\hrulefill}}$


next up previous contents
Next: 2.3.9 Operation Element: SetDims Up: 2.3 The FileStructure Section Previous: 2.3.7 Operation Element: SetValue   Contents

SAIC Ship Technology Division, Annapolis, Maryland, USA
2004-10-26