# list\_open

**URL:** <https://discourse.openehr.org/t/list-open/14868>\
**Category:** Technical (archive)\
**Created:** [8 December 2008 04:33 UTC](https://discourse.openehr.org/t/list-open/14868 "2008-12-08T04:33:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Patterson](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/a/76d3ee/32.png) [@Andrew\_Patterson](https://discourse.openehr.org/u/Andrew_Patterson)\
**Post date:** [8 December 2008 04:33 UTC](https://discourse.openehr.org/t/list-open/14868/1 "2008-12-08T04:33:53Z")

</div>

I have a vague recollection of discussing this before,  
but I can't for the life of me work out what the  
"list\_open" field in AOM C\_STRING class is  
for. It is described as being for when a  
constraint is "non-exhaustive" but I don't know what  
this means in practical terms. I also can't  
work out how the "non-exhaustive" lists would be  
specified in ADL - I was guessing

"a","b", ...

but the ADL explanation says that these are  
for list continuations in dADL which seem to me  
to have a different purpose.

Andrew

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [8 December 2008 09:18 UTC](https://discourse.openehr.org/t/list-open/14868/2 "2008-12-08T09:18:49Z")

</div>

> I have a vague recollection of discussing this before,  
> but I can't for the life of me work out what the  
> "list\_open" field in AOM C\_STRING class is  
> for. It is described as being for when a  
> constraint is "non-exhaustive" but I don't know what  
> this means in practical terms. I also can't

Hi Andrew,

I think in practical terms, when list\_open is set, the string  
validation based on given string value list should not be performed  
since the list is considered non-exhaustive.

> work out how the "non-exhaustive" lists would be  
> specified in ADL - I was guessing
> 
> "a","b", ...

Yes, that seems to be correct ADL format to specific an open list of  
string values.

/Rong

---

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [8 December 2008 17:11 UTC](https://discourse.openehr.org/t/list-open/14868/3 "2008-12-08T17:11:43Z")

</div>

Andrew Patterson wrote:

> I have a vague recollection of discussing this before,  
> but I can't for the life of me work out what the  
> "list\_open" field in AOM C\_STRING class is  
> for. It is described as being for when a  
> constraint is "non-exhaustive" but I don't know what  
> this means in practical terms. I also can't  
> work out how the "non-exhaustive" lists would be  
> specified in ADL - I was guessing
> 
> "a","b", ...

In dADL, the feature you are thinking of is there to allow the parser to  
correctly determine the types of:

\<1.0, 2.0, 3.0\> -\> List\<Integer\>  
\<1.0\> -\> Integer  
\<1.0, ...\> -\> List\<Integer\>

same syntax for any other basic type. It's not a wonderful piece of  
syntax design, but it enabled us to stick to the goal of having no  
typing information at all for basic types in dADL

In C\_STRING, list\_open is a constraint flag that says whether or not  
only the values in the list are allowed to be used; True = other values  
possible (i.e. the listed values are just 'preferred'). The same syntax  
is used, e.g. {"a", "b", ...} is an open list.

- thomas beale
