Tables for
Volume G
Definition and exchange of crystallographic data
Edited by S. R. Hall and B. McMahon

International Tables for Crystallography (2006). Vol. G, ch. 2.1, p. 15

Section Data loop list

S. R. Halla* and N. Spadaccinib

aSchool of Biomedical and Chemical Sciences, University of Western Australia, Crawley, Perth, WA 6009, Australia, and bSchool of Computer Science and Software Engineering, University of Western Australia, 35 Stirling Highway, Crawley, Perth, WA 6009, Australia
Correspondence e-mail: Data loop list

| top | pdf |

A looped list consists of the keyword loop_ followed by

  • (a) a sequence of data names (possibly with nested loop_ constructs); and

  • (b) a sequence of loop packets, each containing data values which are identified in the same order as the data names in (a).

A looped list specifies a table of data in which the data names represent the `header descriptors' for columns of data and the packets represent the rows in the table. Looped lists may be nested to any level. Each loop level is initialized with the loop_ keyword and is followed by the names of data items in this level. Data values that follow the nested data declarations must be in exact multiples of the number of data names. Each loop level must be terminated with a stop_, except the outermost (level 1) which is terminated by either a new data item or the privileged strings indicating a save frame (Section[link]), a data block (Section[link]), a global block (Section[link]) or an end of file.

An example of a simple one-level loop structure is: [Scheme scheme6]

Nested (multi-level) looped lists contain matching data packets [as per (b[link]) above] and an additional stop_ to terminate each level of data. Here is a simple example of a two-level nested list. [Scheme scheme7]

The matching of data names to value packets is applied at each loop level. Initially the data values are matched to the data names listed in the outermost level loop. This process is iterated to successively inner levels. At the innermost loop level, data matching is maintained until a stop_ is encountered. This returns the matching process to the next outer level. The matching process is recursive until the loop structure is depleted. Here is an example of a three-level loop structure. [Scheme scheme8]

to end of page
to top of page