Template:Code listing/doc

This template allows you to display code listings (programming language) inside a collapsible box.

Usage
Invoke with:

Arguments:
 * title: Title for the enclosing box. Optional. Default is "Code listing".
 * state: Initial display state. Optional. Default is "collapsed".
 * listing: Code listing. Required. Be sure to include the tags. Or, use   for any cases where syntax highlighting is not required or not possible.

The  tag supports a number of parameters, such as   to specify the programming language and the   attribute which enables line numbers.

Example
Using:

Results in: