Skip to content

Commit 8fe1e95

Browse files
docs: fix broken example blocks
1 parent 3ca004e commit 8fe1e95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/basics/Variable_metadata.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ A variable can be marked `irreducible` to prevent it from being moved to an
183183
it can be accessed in [callbacks](@ref events)
184184

185185
```@example metadata
186-
@variable important_value [irreducible = true]
186+
@variables important_value [irreducible = true]
187187
isirreducible(important_value)
188188
```
189189

@@ -192,7 +192,7 @@ isirreducible(important_value)
192192
When a model is structurally simplified, the algorithm will try to ensure that the variables with higher state priority become states of the system. A variable's state priority is a number set using the `state_priority` metadata.
193193

194194
```@example metadata
195-
@variable important_dof [state_priority = 10] unimportant_dof [state_priority = -2]
195+
@variables important_dof [state_priority = 10] unimportant_dof [state_priority = -2]
196196
state_priority(important_dof)
197197
```
198198

@@ -201,7 +201,7 @@ state_priority(important_dof)
201201
Units for variables can be designated using symbolic metadata. For more information, please see the [model validation and units](@ref units) section of the docs. Note that `getunit` is not equivalent to `get_unit` - the former is a metadata getter for individual variables (and is provided so the same interface function for `unit` exists like other metadata), while the latter is used to handle more general symbolic expressions.
202202

203203
```@example metadata
204-
@variable speed [unit = u"m/s"]
204+
@variables speed [unit = u"m/s"]
205205
hasunit(speed)
206206
```
207207

0 commit comments

Comments
 (0)