Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array declarations can't have zero dimensions #2753

Merged
merged 1 commit into from
Dec 7, 2020
Merged

Conversation

henrikt-ma
Copy link
Collaborator

I don't know when the statement that there can be zero or more dimension in a general array component declaration, but the grammar still seems to think that there shall be at least one:

array-subscripts :
   "[" subscript { "," subscript } "]"

I don't know when the statement that there can be zero or more dimension in a general array component declaration, but the grammar still seems to think that there shall be at least one:
```
array-subscripts :
   "[" subscript { "," subscript } "]"
```
Copy link
Collaborator

@HansOlsson HansOlsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; it might have been caused by a confusion between zero dimensions and zero size in one dimension.
It was introduced in 9cf69af as part of #2660 - I will be more diligent next time.

@HansOlsson HansOlsson merged commit 98e7ad4 into master Dec 7, 2020
@HansOlsson HansOlsson deleted the henrikt-ma-patch-3 branch December 7, 2020 09:12
@henrikt-ma
Copy link
Collaborator Author

Looks good; it might have been caused by a confusion between zero dimensions and zero size in one dimension.
It was introduced in 9cf69af as part of #2660 - I will be more diligent next time.

No, it was just me who failed to see where it came from in 3.4; back then, it was stated in the Explanation column.

@HansOlsson
Copy link
Collaborator

Looks good; it might have been caused by a confusion between zero dimensions and zero size in one dimension.
It was introduced in 9cf69af as part of #2660 - I will be more diligent next time.

No, it was just me who failed to see where it came from in 3.4; back then, it was stated in the Explanation column.

Ah, you are right - and that explanation column with the same error was present already in Modelica 1.1.

\caption{%
General forms of declaration of arrays.
The notation \lstinline!EB! stands for an enumeration type or \lstinline!Boolean!.
The general array array can have one or more dimensions ($k \geq 1$).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array array?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will fix.

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.

None yet

3 participants