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
1 change: 1 addition & 0 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ \subsection{Short Class Definitions}\label{short-class-definitions}
\end{lstlisting}

Such an array class has exactly one anonymous component (\_); see also \cref{restriction-on-combining-base-classes-and-other-elements}.
This is not legal for specialized class \lstinline!package! and \lstinline!function!.
When a component of such an array class type is flattened, the resulting flattened component type is an array type with the same dimensions as \_ and with the optional modifier applied.

\begin{example}
Expand Down
5 changes: 4 additions & 1 deletion chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ \section{Built-in Functions}\label{built-in-functions}

\section{Record Constructor Functions}\label{record-constructor-functions}

Whenever a record is defined, a record constructor function with the same name and in the same scope as the record class is implicitly defined according to the following rules:
Whenever a scalar record is defined, a record constructor function with the same name and in the same scope as the record class is implicitly defined according to the following rules:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just asking: Is there a risk of confusion when speaking of a scalar record? Could it be interpreted as a record just a single member of "size one"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I doubt that, especially as it doesn't work with the rest of the text.


% Warning: 'partial flatteing' doesn't seem to be defined. See 'partial instantitation'.
The declaration of the record is partially flattened including inheritance, modifications, redeclarations, and expansion of all names referring to declarations outside of the scope of the record to their fully qualified names.
Expand All @@ -856,6 +856,7 @@ \section{Record Constructor Functions}\label{record-constructor-functions}
In the modification, all input parameters are used to set the corresponding record variables.

A record constructor can only be called if the referenced record class is found in the global scope, and thus cannot be modified.
The record constructor can be used in vectorized form according to \cref{scalar-functions-applied-to-array-arguments}.

\begin{nonnormative}
This allows constructing an instance of a record, with an optional modification, at all places where a function call is allowed.
Expand Down Expand Up @@ -981,6 +982,8 @@ \section{Record Constructor Functions}\label{record-constructor-functions}
Demo.Record2(1, 2, 2, 3, 1, 2, 5, 5, {1, 2}, {1, 2, 3});
parameter Demo.Record2 r3 =
Demo.Record2(c2 = 2, n2 = 1, r1 = 1, r4 = 4, r6 = 1 : 5, r7 = {1});
parameter Demo.Record2 r4[2] =
Demo.Record2(c2 = 2, n2 = {1, 2}, r1 = 1, r4 = {4, 5}, r6 = 1 : 5, r7 = {1});
\end{lstlisting}

The above example is only used to show the different variants appearing with prefixes, but it is not very meaningful, because it is simpler to just use a direct modifier.
Expand Down
2 changes: 1 addition & 1 deletion chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ \subsection{Numeric Functions and Conversion Operators}\label{numeric-functions-
EnumTypeName($i$)
\end{lstlisting}\end{synopsis}
\begin{semantics}
For any enumeration type \lstinline!EnumTypeName!, returns the enumeration value \lstinline!EnumTypeName.e! such that $\text{\lstinline!Integer(EnumTypeName.e)!} = i$.
For any scalar enumeration type \lstinline!EnumTypeName!, returns the enumeration value \lstinline!EnumTypeName.e! such that $\text{\lstinline!Integer(EnumTypeName.e)!} = i$.
Refer to the definition of \lstinline!Integer! above.

It is an error to attempt to convert values of $i$ that do not correspond to values of the enumeration type.
Expand Down
2 changes: 1 addition & 1 deletion chapters/scoping.tex
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ \subsection{Composite Name Lookup}\label{composite-name-lookup}
All identifiers of the rest of the name (e.g., \lstinline!B! and \lstinline!B.C!) must be classes.
That is, the composite name is comprised of one or more component names (optionally with indexing), followed by one or more class names.
\item
If the identifier denotes a class, that class is temporarily flattened (as if instantiating a component without modifiers of this class, see \cref{modification-environment} and using the enclosing classes of the denoted class).
If the identifier denotes a scalar class, that class is temporarily flattened (as if instantiating a component without modifiers of this class, see \cref{modification-environment} and using the enclosing classes of the denoted class).
The rest of the name (e.g., \lstinline!B! or \lstinline!B.C!) is looked up among the declared named elements of the temporary flattened class.
The lookup will only find the element (assuming it exists) in the following cases:
\begin{itemize}
Expand Down