10.08.2013 Views

Code Manual for CONTAIN 2.0 - Federation of American Scientists

Code Manual for CONTAIN 2.0 - Federation of American Scientists

Code Manual for CONTAIN 2.0 - Federation of American Scientists

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The ordering requirements within an input block are based on a hierarchy indicated in the template<br />

by the level <strong>of</strong> indentation used to display a group <strong>of</strong> keywords and variables. Thus, the lowest level<br />

in the hierarchy is occupied by the group placed furthest to the right.<br />

The first type <strong>of</strong> ordering requirement is related to the order <strong>of</strong> variables: a contiguous group <strong>of</strong><br />

variables must be specified in the input in the order given in the template. A group <strong>of</strong> variables is<br />

considered contiguous if the variables are all at the same level in the hierarchy and are not separated<br />

by a keyword at any level. (Note that a contiguous group <strong>of</strong> variables may and <strong>of</strong>ten does consist<br />

<strong>of</strong> only one variable, especially one following a keyword.) Furthermore, a contiguous group <strong>of</strong><br />

variables that immediately follows a keyword at the same level in the hierarchy must be specified<br />

immediately after that keyword. Most variables follow such a keyword. However, in some cases<br />

they do not. In such cases, the leading variable <strong>of</strong> the contiguous group has the same function as a<br />

keyword in defining ordering requirements. Such leading variables are <strong>of</strong>ten character variables<br />

representing the name <strong>of</strong> an option or material.<br />

As an example, a keyword PVALUE that has “n” values <strong>of</strong> a variable “p” associated with it might<br />

be displayed in the template in the <strong>for</strong>m:<br />

PVALUE n (p)<br />

where the parentheses imply that the enclosed item(s) should be repeated as necessary. This group<br />

<strong>of</strong> keywords and variables is considered to be at the same (the fust) level in the hierarchy, since only<br />

one (the zero) level <strong>of</strong> indentation is used <strong>for</strong> the group. The variables are contiguous and follow<br />

a keyword in the template and thus must be specified in the order given immediately after the<br />

keyword. If there are four values 1.0, <strong>2.0</strong>, 3.0, and 4.0 <strong>of</strong> “p” associated with PVALUE, the<br />

corresponding input would have the <strong>for</strong>m:<br />

PVALUE 41.0<strong>2.0</strong>3 .04.0<br />

The second type <strong>of</strong> ordering requirement involves sub-blocks <strong>of</strong> data. A sub-block at a given level<br />

in the hierarchy is basically a contiguous group <strong>of</strong> keywords and variables at the given level or lower<br />

that is not separated by keywords or variables at a higher level. The sub-block boundaries are not<br />

uniquely specified according to this definition. For present purposes additional rules are needed to<br />

make the division into sub-blocks at a given level unique. Because <strong>of</strong> the variety <strong>of</strong> ways that subblocks<br />

are recognized in the code, these rules are rather complex: (1) With the exception <strong>of</strong> an<br />

end-<strong>of</strong>-in<strong>for</strong>mation (EOl) keyword, a keyword or leading variable at the same ievel as the sub-block<br />

marks the beginning <strong>of</strong> a new sub-block, as does an indentation to a lower level than the sub-block.<br />

If such a keyword or leading variable is present, it is considered included in the sub-block it begins<br />

and also is considered to terminate the sub-block at the same level immediately preceding it, if one<br />

exists. If such a keyword is present, it is called a leading keyword. An EOI keyword at a given level<br />

has a different effect: it terminates the preceding sub-block at the same level and is considered<br />

included in the sub-block it terminates. Note that a sub-block can have at most one non-EOI<br />

keyword or leading variable at the same level as the sub-block. Thus, at the lowest level in an input<br />

block, individual non-EOI keywords and leading variables each represent a different sub-block.<br />

Rev O 14-7 6/30/97

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!