Template:Select parameter

From Wikibooks, open books for an open world
Jump to navigation Jump to search


Template documentation[view] [edit] [history] [purge]

This simple template provides an alternative to using a switch statement. Instead, it may be replaced by a call to this template. This allows the syntax to be simplified slightly by using unnamed parameters.

Usage[edit source]

Instead of using the following:


the following may be used:

{{Select parameter|n={{{n}}}

The only named parameter {{{n}}} which is passed to this template should be a natural number.