Plantilla:Ifeqany
Documentació de la plantilla [ mostra ] [ modifica el codi ] [ mostra l'historial ] [ refresca ]
Descripció modifica
Aquesta funció compara el primer paràmetre amb la resta (del 2n al vint-i-quatrè). Si és igual a qualsevol d'ells, executa l'acció del paràmetre |y=
i si no coincideix amb cap, executa l'acció del paràmetre |n=
.
Si no s'informen els paràmetres d'acció, retorna 0
quan no coincideix amb cap i 1
quan hi ha alguna coincidència.
Sintaxi i exemples modifica
{{ifeqany|ɪ|ɪ|ɛ|æ|ɒ|ʌ|ʊ|i|e|ɑ|ɔ|o|u|a|ɜ|ə|ɨ}}
- resultat: 1
{{ifeqany|%|ɪ|ɛ|æ|ɒ|ʌ|ʊ|i|e|ɑ|ɔ|o|u|a|ɜ|ə|ɨ}}
- resultat: 0
{{ifeqany|ɪ|ɪ|ɛ|æ|ɒ|ʌ|ʊ|i|e|ɑ|ɔ|o|u|a|ɜ|ə|ɨ|y=trobat|n=no trobat cap}}
- resultat: trobat
{{ifeqany|%|ɪ|ɛ|æ|ɒ|ʌ|ʊ|i|e|ɑ|ɔ|o|u|a|ɜ|ə|ɨ|y=trobat|n=no trobat cap}}
- resultat: no trobat cap
Detalls modifica
- If both {{{y}}} and {{{n}}} are specified, the template returns {{{y}}} if there is a match or {{{n}}} otherwise.
- If only one of {{{y}}} or {{{n}}} is specified, the template returns nothing in place of the unspecified one.
- If neither {{{y}}} nor {{{n}}} are specified, the template returns 1 if there is a match or 0 otherwise.
Vegeu també modifica
- {{ifeqall}}
- Compares one comparison string against up to 10 case strings with optional result string and default result string outputs.
- {{ifequal}}
- Compares up to 16 comparison strings against an equal number of case strings.
- {{ifor}}
- Compares up to 30 comparison strings against an equal number of case strings with optional result string and default result string outputs.
La documentació de més amunt està transclosa de Plantilla:Ifeqany/ús. (modifica | historial) Els editors poden fer proves amb aquesta plantilla al seu espai de proves (crea | modifica) Afegiu categories en la subpàgina /ús. Vegeu les subpàgines d'aquesta plantilla, utilització de paràmetres. |