Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions chapters/lexicalstructure.tex
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,18 @@ \subsection{Modelica Keywords}\label{modelica-keywords}
The following Modelica \firstuse[keyword]{keywords} are reserved words that cannot be used where \lstinline[language=grammar]!IDENT! is expected in the language grammar (\cref{modelica-concrete-syntax}):
\begin{center}
\begin{tabular}{l l l l l}
{\lstinline!algorithm!} & {\lstinline!discrete!} & {\lstinline!false!} & {\lstinline!loop!} & {\lstinline!pure!}\\ \hline
{\lstinline!and!} & {\lstinline!each!} & {\lstinline!final!} & {\lstinline!model!} & {\lstinline!record!}\\ \hline
{\lstinline!annotation!} & {\lstinline!else!} & {\lstinline!flow!} & {\lstinline!not!} & {\lstinline!redeclare!}\\ \hline
& {\lstinline!elseif!} & {\lstinline!for!} & {\lstinline!operator!} & {\lstinline!replaceable!}\\ \hline
{\lstinline!algorithm!} & {\lstinline!each!} & {\lstinline!final!} & {\lstinline!model!} & {\lstinline!record!}\\ \hline
{\lstinline!and!} & {\lstinline!else!} & {\lstinline!flow!} & {\lstinline!not!} & {\lstinline!redeclare!}\\ \hline
{\lstinline!annotation!} & {\lstinline!elseif!} & {\lstinline!for!} & {\lstinline!operator!} & {\lstinline!replaceable!}\\ \hline
{\lstinline!block!} & {\lstinline!elsewhen!} & {\lstinline!function!} & {\lstinline!or!} & {\lstinline!return!}\\ \hline
{\lstinline!break!} & {\lstinline!encapsulated!} & {\lstinline!if!} & {\lstinline!outer!} & {\lstinline!stream!}\\ \hline
{\lstinline!class!} & {\lstinline!end!} & {\lstinline!import!} & {\lstinline!output!} & {\lstinline!then!}\\ \hline
{\lstinline!connect!} & {\lstinline!enumeration!} & {\lstinline!impure!} & {\lstinline!package!} & {\lstinline!true!}\\ \hline
{\lstinline!connector!} & {\lstinline!equation!} & {\lstinline!in!} & {\lstinline!parameter!} & {\lstinline!type!}\\ \hline
{\lstinline!constant!} & {\lstinline!expandable!} & {\lstinline!initial!} & {\lstinline!partial!} & {\lstinline!when!}\\ \hline
{\lstinline!constrainedby!} & {\lstinline!extends!} & {\lstinline!inner!} & {\lstinline!protected!} & {\lstinline!while!}\\ \hline
{\lstinline!der!} & {\lstinline!external!} & {\lstinline!input!} & {\lstinline!public!} & {\lstinline!within!}\\
{\lstinline!connect!} & {\lstinline!enumeration!} & {\lstinline!impure!} & {\lstinline!package!} & {\lstinline!time!}\\ \hline
{\lstinline!connector!} & {\lstinline!equation!} & {\lstinline!in!} & {\lstinline!parameter!} & {\lstinline!true!}\\ \hline
{\lstinline!constant!} & {\lstinline!expandable!} & {\lstinline!initial!} & {\lstinline!partial!} & {\lstinline!type!}\\ \hline
{\lstinline!constrainedby!} & {\lstinline!extends!} & {\lstinline!inner!} & {\lstinline!protected!} & {\lstinline!when!}\\ \hline
{\lstinline!der!} & {\lstinline!external!} & {\lstinline!input!} & {\lstinline!public!} & {\lstinline!while!}\\ \hline
{\lstinline!discrete!} & {\lstinline!false!} & {\lstinline!loop!} & {\lstinline!pure!} & {\lstinline!within!}\\
\end{tabular}
\end{center}

Expand Down
4 changes: 2 additions & 2 deletions chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ \subsection{Member Access Operator}\label{member-access-operator}

\subsection{Built-in Variable time}\label{built-in-variable-time}\indexinline{time}

All declared variables are functions of the independent variable \lstinline!time!.
The variable \lstinline!time! is a built-in variable available in all models and blocks, which is treated as an input variable.
All declared variables are functions of \lstinline!time!.
The name \lstinline!time! is a keyword (see \cref{modelica-keywords}), and corresponds to a built-in variable available in all models and blocks, which is treated as an input variable.
It is implicitly defined as:
\begin{lstlisting}[language=modelica]
input Real time (final quantity = "Time",
Expand Down
4 changes: 3 additions & 1 deletion chapters/syntax.tex
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ \subsection{Expressions}\label{expressions1}
| STRING
| false
| true
| time
| ( component-reference | der | initial | pure ) function-call-args
| component-reference
| "(" output-expression-list ")" [ ( array-subscripts | "." IDENT ) ]
Expand All @@ -432,7 +433,8 @@ \subsection{Expressions}\label{expressions1}

result-reference :
component-reference
| der "(" component-reference [ "," UNSIGNED-INTEGER ] ")"
| time
| der "(" ( component-reference | time ) [ "," UNSIGNED-INTEGER ] ")"

function-call-args :
"(" [ function-arguments ] ")"
Expand Down
2 changes: 1 addition & 1 deletion mlslistings.sty
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
% otherkeywords={-, =, +, [, ], (, ), \{, \}, :, *, !},%
morekeywords=[1]{% Keywords not used to define code structure
der,connect,assert,terminate,break,return,%
false,true,and,not,or,%
time,false,true,and,not,or,%
final,each,%
flow,stream,%
input,output,%
Expand Down