Skip to content

Commit

Permalink
Turn "DynamicSelect-expression" table row into recommendation for ref…
Browse files Browse the repository at this point in the history
…ormulation
  • Loading branch information
henrikt-ma committed Mar 31, 2021
1 parent c18233f commit 9029a2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 4 additions & 7 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1091,13 +1091,10 @@ \subsubsection{Bitmap}\label{bitmap}

\subsection{Variable Graphics and Schematic Animation}\label{variable-graphics-and-schematic-animation}

Any value (coordinates, color, text, etc.) in graphical annotations can
be dependent on class variables using the \lstinline!DynamicSelect! expression.
\lstinline!DynamicSelect! has the syntax of a function call with two arguments,
where the first argument specifies the value of the editing state and
the second argument the value of the non-editing state. The first
argument must be a literal expression. The second argument may contain
references to variables to enable a dynamic behavior.
Any value (coordinates, color, text, etc.) in graphical annotations can be dependent on class variables using \lstinline!DynamicSelect!.
\lstinline!DynamicSelect! has the syntax of a function call with two arguments, where the first argument specifies the value of the editing state and the second argument the value of the non-editing state.
The first argument must be a literal expression.
The second argument may contain references to variables to enable a dynamic behavior.

\begin{example}
The level of a tank could be animated by a rectangle expanding in vertical direction and its color depending on a variable overflow:
Expand Down
5 changes: 4 additions & 1 deletion styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,15 @@ Different constructs with _expression_ and _call_:
Appearance | LaTeX source | Comment
--- | --- | ---
`if`-expression | `\lstinline!if!-expression` | Generic language concept
`DynamicSelect`-expression | `\lstinline!DynamicSelect!-expression` | Currently with space in the document!
`Curve`-expression | `\lstinline!Curve!-expression` | Currently with space in the document!
`Real` expression | `\lstinline!Real! expression` | An expression of type `Real`
`y` expression | `\lstinline!y! expression` | Expression for something named `y`
`convertElement` call | `\lstinline!convertElement! call` | A call expression with callee `convertElement`

In particular, avoid other constructs with _expression_ than the variants above.
For other needs, try to find a formulation not based on _expression_ to avoid misinterpretations according to the variants above.
For example, instead of saying "… can be dependent on class variables using the `DynamicSelect` expression", just say "… can be dependent on class variables using `DynamicSelect`".

Note: There is no need for hyphenation of "`convertElement` call" since we don't say "`Real` call" for a call expression of type `Real` (we have "`Real` expression" for this purpose).

### The keywords themselves
Expand Down

0 comments on commit 9029a2a

Please sign in to comment.