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"

From Prime-Wiki
Jump to: navigation, search
(default for no MultiRes)
(use RMaxn if filled although RMultiRes is set)
Line 20: Line 20:
 
:{{GP|Riesel prime 65|RDate}}
 
:{{GP|Riesel prime 65|RDate}}
  
*<nowiki>{{GP|Riesel prime 65|RNlist}}</nowiki> (ignoring MultiReservation) results in
+
*<nowiki>{{GP|Riesel prime 65|RNlist}}</nowiki>
 
:{{GP|Riesel prime 65|RNlist}}
 
:{{GP|Riesel prime 65|RNlist}}
 
[[Category:Templates]]</noinclude><includeonly><!--
 
[[Category:Templates]]</noinclude><includeonly><!--
Line 33: Line 33:
 
-->{{#if:{{#pos:{{{1}}}|Woodall}}|{{#vardefine:_type|Woodall prime}}{{#vardefine:_short|Wo}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|Woodall}}|{{#vardefine:_type|Woodall prime}}{{#vardefine:_short|Wo}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|Gen}}|{{#vardefine:_type|Gen {{#var:_type}}}}}}<!--
 
-->{{#if:{{#pos:{{{1}}}|Gen}}|{{#vardefine:_type|Gen {{#var:_type}}}}}}<!--
-->{{#vardefine:_mres|none}}<!--
 
 
-->{{#vardefine:_mres|{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}MultiRes}}}}}}<!--
 
-->{{#vardefine:_mres|{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}MultiRes}}}}}}<!--
 +
-->{{#vardefine:_mmax|{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}Maxn}}}}}}<!--
 
-->{{#ifexist:{{{1}}}|{{#if:{{#var:_mres}}|
 
-->{{#ifexist:{{{1}}}|{{#if:{{#var:_mres}}|
 
   {{#switch:{{{2}}}
 
   {{#switch:{{{2}}}
   |RMaxn |PMaxn={{Multi Reservation:{{#var:_mres}}-NMax}}
+
   |RMaxn |PMaxn={{#ifeq:{{#var:_mmax}}||{{Multi Reservation:{{#var:_mres}}-NMax}}|{{#var:_mmax}}}}
 
   |RDate |PDate={{Multi Reservation:{{#var:_mres}}-Date}}
 
   |RDate |PDate={{Multi Reservation:{{#var:_mres}}-Date}}
 
   |#default={{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{{2}}}}}
 
   |#default={{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{{2}}}}}

Revision as of 22:32, 3 August 2020

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
  • {{GP|Riesel prime 65|RMaxn}} (using MultiReservation) results in
  • {{GP|Riesel prime 65|RDate}} (using MultiReservation) results in
  • {{GP|Riesel prime 65|RNlist}}