11.10. Fido Input
11.10.1. Introduction
The FIDO input method is specially devised to allow entering or modifying large data arrays with minimal effort. Patterns of repetition or symmetry are used wherever possible. The FIDO system was patterned after the input method used with the FLOCO coding system at Los Alamos and was first applied to the DTF-II code. Since that time, numerous features requested by users have been added, a free-field option has been developed, and the application of FIDO has spread to innumerable codes.
The data are entered in units called “arrays.” An array comprises a group of contiguous storage locations to be filled with data at the same time. These arrays usually correspond one-to-one with FORTRAN arrays used in the program. A group of one or more arrays read with a single call to the FIDO package forms a “block,” and a special delimiter is required to signify the end of each block. Arrays within a block may be read in any order with respect to each other, but an array belonging to one block must not be shifted to another. The same array can be entered repeatedly within the same block. For example, an array could be filled with “0” using a special option, and then a few scattered locations could be changed by reading in a new set of data for that array. If no entries to the arrays in a block are required, the delimiter alone satisfies the input requirement.
Three major types of input are available: fixed-field input, free-field input, and user-field input.
11.10.2. Fixed-Field Input
The fixed-field input option is documented here for completeness. The use of fixed-field input is NOT recommended. Use the free-field input option documented in Sect. 11.10.3.
Each card is divided into six 12-column data fields, each of which is divided into three subfields. The following outline illustrates a typical data field. The three subfields always comprise 2, 1, and 9 columns, respectively.
To begin the first array of a block, an array originator field is placed in any field on a card:
Subfield 1 |
An integer array identifier <100 specifying the data array to be read in. |
Subfield 2 |
An array-type indicator: |
|
|
|
|
|
|
Subfield 3 |
Blank |
Data are then placed in successive fields until the required number of entries has been accounted for.
In entering data, it is convenient to think of an “index” or “pointer” as a designator that is under the control of the user and that specifies the position in the array into which the next data entry is to go. The pointer is always positioned at array location #1 by entering the array originator field. The pointer subsequently moves according to the data operator chosen. Blank fields are a special case in that they do not cause any data modification and do not move the pointer.
A data field has the following form:
Subfield 1: |
The data numerator, an integer <100, referred to as N1 in the following discussion |
Subfield 2: |
One of the special data operators listed below |
Subfield 3: |
A nine-character data entry to be read in F9.0 format.
It will be converted to an integer if the array is a |
A list of data operators and their effects on the array being entered is provided below:
“Blank” indicates a single entry of data. The data entry in the third subfield is entered in the location indicated by the pointer, and the pointer is advanced by one. However, an entirely blank field is ignored.
“+” or “\(-\)” indicates exponentiation. The data entry in the third field is entered and multiplied by \({10}^{+N_1}\) or \({10}^{\pm N_1}\), where N1 is the data numerator in the first subfield, given the sign indicated by the data operator itself. The pointer advances by one. For cases in which an exponent is needed, this option allows the entering of more significant figures than the blank option.
“&” has the same effect as “+.”
The reading of data to an array is terminated when a new array origin field is supplied or when the block is terminated. If an incorrect number of positions has been filled, an error edit is given, and a flag is set which will later abort execution of the problem. FIDO then continues with the next array if an array origin was read. Otherwise, control is returned to the calling program.
A block termination consists of a field having “T” in the second subfield. Entries following “T” on a card are ignored, and control is returned from FIDO to the calling program.
Comment cards can be entered within a block by placing an apostrophe (’) in column 1. Then columns 2–0 will be listed, with column 2 being used for printer carriage control. Such cards have no effect on the data array or pointer.
11.10.3. Free-Field Input
With free-field input, data are written without fixed restrictions as to field and subfield size and positioning on the card. The options used with fixed-field input are available, although some are slightly restricted in form. In general, fewer data cards are required for a problem, the interpreting print is easier to read, a card listing is more intelligible, the cards are easier to keypunch, and certain common keypunch errors are tolerated without affecting the problem. Data arrays using fixed- and free-field input can be intermingled at will within a given block.
The concept of three subfields per field is still applicable to free-field input, but if no entry for a field is required, no space for it needs to be left. Only columns 1–72 may be used as with fixed-field input. A field may not be split across cards.
The array originator field can begin in any position. The array identifiers and
type indicators are used as in fixed-field input. The type indicator is entered
twice to designate free-field input (i.e., $$, **, or ##). The blank third
subfield required in fixed-field input is not required. For example,
31**
indicates that array 31, a real-data array, will follow in free-field format.
Data fields may follow the array origin field immediately. The data field entries are identical to the fixed-field entries with the following restrictions:
Any number of blanks may separate fields, but at least one blank must follow a third subfield entry if one is used.
If both first- and second-subfield entries are used, no blanks may separate them (i.e., 24S, but not 24 S).
Numbers written with exponents must not have imbedded blanks (i.e., 1.0E+4, 1.0-E4, 1.0+4, or even 1+4, but not 1.0 E4). A zero should never be entered with an exponent. For example, 0.00-5 or 0.00E-5 will be interpreted as \(-5 \times 10^{-2}\).
In third-subfield data entries, only 9 digits—including the decimal but not including the exponent field—can be used (i.e., 123456.89E07, but not 123456.789E07).
The Z entry must be of the form: 738Z, not Z738 or 738 Z.
The + or - data operators are not needed and are not available.
The Q, N, and M entries are restricted: 3Q4, 1N4, M4, but not 4Q, 4N, or 4M.
11.10.4. User-Field Input
If the user follows the array identifier in the array originator field with the character “U” or “V,” the input format is to be specified by the user. If “U” is specified, the FORTRAN FORMAT to be used must be supplied in columns 1–72 of the next card. The format must be enclosed by the usual parentheses. Then the data for the entire array must follow on successive cards. The rules of ordinary FORTRAN input as to exponents, blanks, etc., apply. If the array data do not fill the last card, the remainder must be left blank.
“V” has the same effect as “U” except that the format read in the last preceding “U” array is used.
11.10.5. Character Input
If the user wishes to enter character data into an array, at least three options are available. The user may specify an arbitrary format using a “U” and reading in the format. The user may follow the array identifier by a “/.” The next two entries into subfield 3 specify the beginning and ending indices in the array into which data will be read. The character data are then read starting with the next data card in an 18A4 format.
Finally, the user may specify the array as a free-form “*” array and then specify the data entries as “nH” character data, where n specifies how many characters follow H.