-
Notifications
You must be signed in to change notification settings - Fork 40
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
Added "four-line" proposal for units of literals #3266
Open
casella
wants to merge
24
commits into
modelica:MCP/0027
Choose a base branch
from
casella:MCP/0027+literal-unit
base: MCP/0027
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
7524b11
Initial commit of ReadMe.md for MCP-0027
henrikt-ma a762fc7
Added "four-line" proposal for units of literals
casella bdbea3b
Reformatted to use sentence-based line breaks. Added inline codes for…
casella eb116d7
Wrote out LHS and RHS
casella b676ad9
Outputs of transcendental functions should be dimensionless
casella 11dc52d
Fixed type
casella 9a1deda
Updated proposal
casella df6242b
Update chapters/lexicalstructure.tex
casella 5d5f466
Update chapters/lexicalstructure.tex
casella 398c013
Update chapters/lexicalstructure.tex
casella 7a9f340
Update chapters/lexicalstructure.tex
casella 77eaae7
Update chapters/lexicalstructure.tex
casella 8916f6e
Update chapters/lexicalstructure.tex
casella 2c817dd
Update chapters/lexicalstructure.tex
casella 942776f
Update chapters/lexicalstructure.tex
casella b3e0dc1
Update chapters/lexicalstructure.tex
casella 3370313
Update lexicalstructure.tex
casella 7539f1b
Update lexicalstructure.tex
casella 15bb554
Update chapters/lexicalstructure.tex
HansOlsson 26bce83
Update chapters/lexicalstructure.tex
HansOlsson ba23447
Update chapters/lexicalstructure.tex
HansOlsson 4a7c941
Update chapters/lexicalstructure.tex
HansOlsson 0f5c46a
Update lexicalstructure.tex
casella e325f6f
Used LaTeX instead of rST for itemized list
casella File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm off-base or too precise again, but I don't think expressions even have a
unit
attribute string -- onlyReal
does (4.8.1).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could write "real expression". Note that the literal can also be an integer literal, but the assumption is that both x and x+L (etc) are "real expressions".
Alternatively, we could view it as expressions having a unit - in general - but that may require more work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall have the same \lstinline!unit! attribute string as
x
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about arrays?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's messier - let's focus on their scalar elements first.
Usually, arrays are homogenous - i.e., all elements have the same unit - but sometimes they are not (especially when applying filtering to an array).
Note that you can write
Real x[2](unit={"m","m/s"})
, so you can create non-homogenous arrays - but it's not common.(I believe we added support for that in Dymola in 2013.)