# Why does “set S := 50 .. 70” give me a set of only 3 members?

**URL:** <https://discuss.ampl.com/t/why-does-set-s-50-70-give-me-a-set-of-only-3-members/63>\
**Category:** FAQs\
**Tags:** sets-and-indexing\
**Created:** [December 15, 2021, 5:45pm UTC](https://discuss.ampl.com/t/why-does-set-s-50-70-give-me-a-set-of-only-3-members/63 "2021-12-15T17:45:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![megrobert](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@megrobert](https://discuss.ampl.com/u/megrobert)\
**Post date:** [December 15, 2021, 5:45pm UTC](https://discuss.ampl.com/t/why-does-set-s-50-70-give-me-a-set-of-only-3-members/63/1 "2021-12-15T17:45:39Z")

</div>

You have declared `set S` in your model and `set S := 50 .. 70` in your data. Set expressions are not recognized in AMPL’s data mode, however. Instead AMPL tries to recognize `50 .. 70` as a space-delimited list of members of `S` , with the result that it has found three members: the numbers `50` and `70` , and the string `".."` .

To define `S` to equal `50 .. 70` by use of your data file, first declare `S` in your model by

```auto
param begin; 
param end > begin; 
set S := begin .. end;

```

Then state in the data file:

```auto
param begin := 50; 
param end := 70;

```

Alternatively, it’s legal to give `set S = 50 .. 70` as your declaration of `S` . This is a less desirable approach, however, because it moves some of the specific data values into the model.
