In building the accessor routines we were confronted with the opposing objectives of ease of use and efficiency. On the one hand you would ideally like to access data, regardless of type, in a simple uniform manner. Such an approach would, however, require an ``if'' statement being evaluated with each access, something that is computationally wasteful, especially inside loops. Our decision was to offer the programmer either alternative. When speed is not an issue, a simple data call can be used to access the data. In most cases, the user will have for-knowledge of his data type, in which case we provide the simple routines: rdata, for real data; cdata, for complex data; and idata, for integer data.
Making data access simple and straight forward was one of our primary concerns in designing our Fortran90 environment.
|sepdata||sep_type||The name of dataset.|
|index1||integer||location within sep_tr%hdrs structure.|
|index2..7||integer||location with in sep_tr array.|
In order to make the transition for users simple, we built accessors to mirror array accessing in Fortran 77. In Fortran 77 you would access a 2-D array through:
Using our Fortran90 library the general form of the call would be:
Where array is a sep_2d type, and i1 and i2 are integers.