الگو:Evd
| ویرایشگران میتوانند در صفحات تمرین (ایجاد | آینه) و آزمایشی (ایجاد) این الگو را آزمایش کنند. لطفاً ردهها را به زیرصفحهٔ /توضیحات بیفزایید. زیرصفحههای این الگو. |
This template الگو:Tim shows the call of a template or predefined template and its result, for documentation.|
- Usage:
{{Evd|left side|up to 3 additional parameters}}{{Evd|left side|up to 3 additional parameters|s=separator}}
- The default separator is "نتیجه میدهد", use s== or similar to get "=" etc. Please note that for colon functions the first parameter belongs to the left side before the "|" vertical bar aka pipe.
Examples without additional parameters:
Examples:
{{Evd|CURRENTDAY|s=is}}displays- {{
CURRENTDAY}} is "۳۰"
- {{
{{Evd|#expr:2*3}}displays- {{
#expr:2*3}} نتیجه میدهد "6"
- {{
{{Evd|1=#expr:2+2=5}}displays- {{
#expr:2+2=5}} نتیجه میدهد "0"
- {{
{{Evd|1=#expr:(2+2=4)|s==}}displays- {{
#expr:(2+2=4)}} = "1"
- {{
{{Evd|urlencode:!|s==}}displays- {{
urlencode:!}} = "%21"
- {{
- {{Evd|uc:abc} نتیجه میدهد
- {{
uc:abc}} نتیجه میدهد "ABC"
- {{
- {{subst:Evd|uc:Upper Case|subst=subst:}} substitutes
- {{
subst:uc:Upper Case}} نتیجه میدهد UPPER CASE - See Help:Substitution for several caveats wrt subst=subst:.
- {{
As always the expression (first parameter) cannot directly contain "|", "=", plus other special cases related to square brackets / curly braces. In the case of this template "not directly" means "never" except from "=" as shown above.
This template and الگو:Evdn(ویرایش بحث پیوندها تاریخچه) can be used if the case of an expression in double braces which itself includes a pair of double braces (simple nested expressions). For the former, use named parameters 1n (Nested part of first parameter) and optionally 1a (part After that). For the latter, use "|" for the inner "{{" and, if there is code after it, also for "}}".
{{evd|#expr:24*|1n=CURRENTDAY}}نتیجه میدهد {{#expr:24*{{CURRENTDAY}}}} نتیجه میدهد "خطای عبارت: نویسه نقطهگذاری شناخته نشده «۳»"{{evdn|#expr:24*|CURRENTDAY}}نتیجه میدهد الگو:Evdn{{evd|#expr:24*|1n=CURRENTDAY|1a=-24}}نتیجه میدهد {{#expr:24*{{CURRENTDAY}}-24}} نتیجه میدهد "خطای عبارت: نویسه نقطهگذاری شناخته نشده «۳»"{{evdn|#expr:24*|CURRENTDAY|-24}}نتیجه میدهد الگو:Evdn{{evdn|#expr:4*|#expr:not 0| >3 | yields}}displays{{evdn|urlencode:|DIRMARK}}displays
Examples with additional parameters (no nesting possible):
- Example:
{{Evd|#ifeq: 1.00|+1|okay}}نتیجه میدهد:- {{
#ifeq: 1.00|+1|okay}} نتیجه میدهد "okay" - Example:
{{Evd|#ifeq: this|that||false|is}}نتیجه میدهد:- {{
#ifeq: this'|that|'|false}} نتیجه میدهد "false" - Example:
{{Evd|#expr: 3*4}}نتیجه میدهد:- {{
#expr: 3*4}} نتیجه میدهد "12" - Example:
{{evaldemo|#expr: 3*4}}نتیجه میدهد:- الگو:Evaldemo
- {{
tc}} نتیجه میدهد "الگو:Tc" - {{
t|b}} نتیجه میدهد "b" - {{
t|b|c}} yields "b" - {{
t2|b|c}} نتیجه میدهد "الگو:T2" - {{
t2|b|c|d}} نتیجه میدهد "الگو:T2" - {{
t2|b|c|d}} yields "الگو:T2"
Optional substitution with subst=subst: is not supported. It's anyway against the spirit of this demo template showing what another template actually does, and not what it did some time ago.
| ویرایشگران میتوانند در صفحات تمرین (ایجاد | آینه) و آزمایشی (ایجاد) این الگو را آزمایش کنند. لطفاً ردهها را به زیرصفحهٔ /توضیحات بیفزایید. زیرصفحههای این الگو. |