User:Patrick/Transclusion depth test

Transclusion depth test:

Depth Result
0 {{{1}}}
1 {{{1}}}
2 {{{1}}}
3 {{{1}}}
4 {{{1}}}
5 {{{1}}}
6 {{{1}}}
7 {{{1}}}
8 {{{1}}}
9 {{{1}}}
10 {{{1}}}
11 {{{1}}}
12 {{{1}}}
13 {{{1}}}
14 {{{1}}}
15 {{{1}}}
16 {{{1}}}
17 {{{1}}}
18 {{{1}}}
19 {{{1}}}
20 {{{1}}}
21 {{{1}}}
22 {{{1}}}
23 {{{1}}}
24 {{{1}}}
25 {{{1}}}
26 {{{1}}}
27 {{{1}}}
28 {{{1}}}
29 {{{1}}}
30 {{{1}}}
31 {{{1}}}
32 {{{1}}}
33 {{{1}}}
34 {{{1}}}
35 {{{1}}}
36 {{{1}}}
37 {{{1}}}
38 {{{1}}}
39 {{{1}}}

This template is used in the investigation of template depth limits.

It calls subtemplate /39, which produces row 0 and calls /38 which produces row 1 and calls /37, etc.

The examples show that the complexity of the expression for parameter 1 does not make any difference for the number of levels of subtemplates without error. Also, putting the call in the then- or else-part of #if does not make a difference. However, putting the call in a template parameter reduces the number of levels of subtemplates without error by 1.

Usage edit

{{Patrick | {{some template| ... }} }}

Maximum depth edit

To limit the maximum depth of the test, set maxdepth to a value between 0 and 40.

{{Patrick | maxdepth = num | {{some template| ... }} }}

The default value for maxdepth is 40.

See also edit

}}

Examples edit

{{transclusion depth test|tdt}} {{transclusion depth test|{{#if:x|tdtifx}}}} {{transclusion depth test|{{1x|tdt1x}}}} {{#if:x|{{transclusion depth test|ifxtdt}}}} {{1x|{{transclusion depth test|1xtdt}}}} {{1x|{{1x|{{transclusion depth test|1x1xtdt}}}}}} {{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{transclusion depth test|20times1xtdt}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} {{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{1x|{{transclusion depth test|36times1xtdt}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}