Difference between revisions of "Template:F"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{
+
<includeonly><code>{{Lnkstart}}{{{1}}}{{!}}{{{2|{{{1}}}}}}&#40;&#41;{{Lnkend}}</code></includeonly><noinclude>
Lnkstart}}{{{1}}}{{
 
!}}{{{1}}}(){{
 
Lnkend}}</includeonly>
 
<noinclude>
 
 
A simple way of linking to a function page, but displaying it with the parentheses.
 
A simple way of linking to a function page, but displaying it with the parentheses.
  
For example, <nowiki>{{f|to_string}}</nowiki> produces: [[to_string|to_string()]].
+
For example, <pre>{{f|to_string}}</pre> produces: {{f|to_string}}.
 +
 
 +
You can link to a function page while using a different name (e.g. when discussing JavaScript versions of ASH functions) by specifying a second parameter.
 +
For example, <pre>{{f|to_string|toString}}</pre> produces {{f|to_string|toString}}.
 +
 
 
[[Category:Basic Templates]]
 
[[Category:Basic Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 07:51, 22 January 2021

A simple way of linking to a function page, but displaying it with the parentheses.

For example,

{{f|to_string}}

produces: to_string().

You can link to a function page while using a different name (e.g. when discussing JavaScript versions of ASH functions) by specifying a second parameter.

For example,

{{f|to_string|toString}}

produces toString().