Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

Examples/Module: dplvar (example 2): Difference between revisions

Add example (that can be sandboxed on a users user page)
imported>FrozenPlum
(Created page with "<noinclude>{{noedit}}</noinclude><!-- This is the example preloaded for testing, press "Show Preview" to see the example working (at the bottom of the page). If you save this page, it saves as a new section at the bottom of your '''User:Username/Sandbox''' --> ==Example== This sets <pre> {{#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: {...")
 
imported>FrozenPlum
(Add example (that can be sandboxed on a users user page))
Line 5:
-->
==Example==
The first line's statements set the variables initially as: '''{{tt|a}}''' to <code>''x''</code>, '''{{tt|b}}''' to <code>''y''</code>, and '''{{tt|c}}''' to ''<code><nowiki><!--empty--></nowiki></code>''; then the following variables also have a default set: '''{{tt|a}}''' to <code>''aaaa''</code>, '''{{tt|c}}''' to <code>''cccc''</code>, and '''{{tt|d}}''' to <code>''dddd''</code>.
This sets
 
The last four lines display the value of each corresponding variable in a bulleted list format.
 
<pre>
{{#dplvar:set|a|x|b|y|c|<!--empty-->}} {{#dplvar:default|a|aaaa}} {{#dplvar:default|c|cccc}} {{#dplvar:default|d|dddd}}
Line 22 ⟶ 25:
* c: {{#dplvar:c}}
* d: {{#dplvar:d}}
 
 
'''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.
<noinclude>
[[Category:Uses dplvar module]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.