Skip to content

Commit 3242bde

Browse files
authored
Merge pull request #2278 from ControlSystemStudio/macro_doc
Document $(macro=default_value)
2 parents 4a5268e + 19556e3 commit 3242bde

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

app/display/editor/doc/macros.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,21 @@ expand *Show Details* and select *System Properties* tab:
7373

7474
.. image:: images/system_properties.png
7575

76+
77+
Default Values
78+
==============
79+
80+
When using a macro as in **$(macro_name)** and the value for **macro_name** is not defined,
81+
the result will be an empty string.
82+
The syntax **$(macro_name=default_value)** can be used to yield the text **default_value**
83+
unless **macro_name** has a defined value.
84+
85+
One use case for default macro values are displays that allow standalone tests.
86+
When a display with **$(pv=sim://sine)** is executed with a value for the **pv** macro,
87+
that value will be used, but the display can also be opened "standalone" and will then use
88+
the default value of **sim://sine**.
89+
90+
7691
General Remark
7792
==============
7893

0 commit comments

Comments
 (0)