Skip to content

Update description for numerical value ranges#31

Merged
vaitkus merged 4 commits into
mainfrom
enumeration_range_for_arrays_too
Jun 26, 2026
Merged

Update description for numerical value ranges#31
vaitkus merged 4 commits into
mainfrom
enumeration_range_for_arrays_too

Conversation

@jamesrhester

Copy link
Copy Markdown
Collaborator

_enumeration.range can apply to Array types with no ambiguity, so I thought it was worth stating that it can apply to the contents of array types as well. Other compound types are not covered, as Lists can have heterogenous types, as can Tables.

Clarified description regarding numerical value ranges and Array types.
@vaitkus

vaitkus commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

I am all in favour of this extension. However, maybe it would make sense to also allow this to Matrixes (all elements of the same type) as well as Lists and Tables where all elements are declared to have the same type?

In earlier revisions of DDLm, the _type.contents attribute allowed to specify complex content type expressions (something along the lines of Text|Integer), but nowadays the type is generally the same for all elements, unless something like Implied, ByReference or Inherited is used (which may still also resolve to a single type in the end).

Furthermore, the few actual cases where the _enumeration.range is used with a more complex container type involve Lists (see _pd_calc.component_intensities_total and _pd_calc.component_intensities_net from the pdCIF dictionary).

@jamesrhester

Copy link
Copy Markdown
Collaborator Author

I am all in favour of this extension. However, maybe it would make sense to also allow this to Matrixes (all elements of the same type) as well as Lists and Tables where all elements are declared to have the same type?

I have updated accordingly.

Comment thread ddl.dic Outdated
Co-authored-by: Antanas Vaitkus <antanas.vaitkus90@gmail.com>
@vaitkus vaitkus merged commit 7ba69ae into main Jun 26, 2026
3 checks passed
jamesrhester added a commit that referenced this pull request Jun 29, 2026
---------

Co-authored-by: Antanas Vaitkus <antanas.vaitkus90@gmail.com>
(cherry picked from commit 7ba69ae)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants