Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3). |
Navigation
Topics | Help • Register • News • History • How to • Sequences statistics • Template prototypes |
Difference between revisions of "Template:GP"
(using any prime template) |
|||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
==Description== | ==Description== | ||
− | Get a parameter value of a template by name | + | Get a parameter value of a template by name if exists, "" (null) otherwise. |
==Call== | ==Call== | ||
− | :<nowiki>{{GP|< | + | :<nowiki>{{GP|<prime name>|<Parameter>}}</nowiki> |
− | == | + | ==Examples== |
Get the parameter "CKReserved" from "Carol-Kynea base 2" primes | Get the parameter "CKReserved" from "Carol-Kynea base 2" primes | ||
− | + | *<nowiki>{{GP|Carol-Kynea prime 2|CKBase}}</nowiki> results in | |
+ | :{{GP|Carol-Kynea prime 2|CKBase}} | ||
+ | |||
+ | *<nowiki>{{GP|Riesel prime 15|RMaxn}}</nowiki> results in | ||
+ | :{{GP|Riesel prime 15|RMaxn}} | ||
[[Category:Templates]] | [[Category:Templates]] | ||
− | </noinclude><includeonly>{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ | + | </noinclude><includeonly>{{#vardefine:q|{{#sub:{{{1}}}|0|{{#rpos:{{{1}}}| }} }}}}{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:q}}}:{{{2}}}}}|}}</includeonly> |
Revision as of 12:06, 1 April 2019
Description
Get a parameter value of a template by name if exists, "" (null) otherwise.
Call
- {{GP|<prime name>|<Parameter>}}
Examples
Get the parameter "CKReserved" from "Carol-Kynea base 2" primes
- {{GP|Carol-Kynea prime 2|CKBase}} results in
- 2
- {{GP|Riesel prime 15|RMaxn}} results in