Unlike UNIQUE, REPEAT modifies its preceding field. In the ?TShirt model a list is specified by
Wear_on_days Int REPEAT //days of months to be worn
My intention is that a particular shirt is to be worn on certain days,
e.g. the 1st, 5th, 7th, and 9th of the month. This data would be
entered as follows:
TShirt : sam09 Wear_on_days 1 5 7 9The corresponding text window lists the values horizontally:

The horizontal display can be the sole rationale for using a list in a model. But it is important to understand all the properties of a list.
If we enter two lists, containing identical elements but in different orders, ACEDB accepts both of them because they are distinct lists:
TShirt : sam10 Wear_on_days 1 5 7 9 Wear_on_days 7 9 1 5

REPEAT does not restrict the number of entries in the field and, as noted earlier, allows values to appear more than once. The latter property is not relevant for my t-shirts but might be useful in other contexts (a series of measurements, for example).
Second, If you use REPEAT, the field it modifies must be the last (rightmost) one on its branch. Thus:
Wear_on_days Text Int REPEAT //this is ok
Wear_on_days Int REPEAT Text //***WRONG!
Wear_on_days Int REPEAT Text REPEAT //***WRONG!
Note that since REPEAT modifies a single field, it follows that all
the REPEATed items must be of the same type.
Back to Table of Contents