Examples/Module: dplvar (example 3)
Appearance
< Examples
Example
[edit source]The first line's statements set the variables initially as: a to x, b to y, and c to <!--empty-->; then the following variables also have a default set: a to aaaa, c to cccc, and d to dddd.
The last four lines display the value of each corresponding variable in a bulleted list format.
{{#dplvar:set|a|x|b|y|c|<!--empty-->}} {{#dplvar:default|a|aaaa}} {{#dplvar:default|c|cccc}} {{#dplvar:default|d|dddd}}
* a: {{#dplvar:a}}
* b: {{#dplvar:b}}
* c: {{#dplvar:c}}
* d: {{#dplvar:d}}
Result
[edit source]- a: x
- b: y
- c: cccc
- d: dddd
Notes:
- Variable "c" was set to "cccc" because although it was already set, its note is equivalent to an empty value.
- Variable "d" was set to "dddd" because it was not already set.