Template:Func link: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (cat; doc style)
(Update to <code> tags)
Line 1: Line 1:
<includeonly>{{#if: {{{ext|}}} <!-- is an external link is supplied?
<includeonly>{{#if: {{{ext|}}} <!-- is an external link is supplied?
-->| <span class="plainlinks">[{{{ext}}} <tt>{{{api}}}</tt>]</span> <!-- yes, so link to that
-->| <span class="plainlinks">[{{{ext}}} <code>{{{api}}}</code>]</span> <!-- yes, so link to that


-->| {{#switch: {{{api|error}}} <!-- no, so use switch for pre-set APIs
-->| {{#switch: {{{api|error}}} <!-- no, so use switch for pre-set APIs
Line 6: Line 6:
<!-- pre-made links for core library Nasal APIs below -->
<!-- pre-made links for core library Nasal APIs below -->
| append
| append
| append() = [[User:Red_Leader/Nasal_library#append.28.29|<tt>append()</tt>]]
| append() = [[User:Red_Leader/Nasal_library#append.28.29|<tcodet>append()</code>]]
| bind
| bind
| bind() = [[User:Red_Leader/Nasal_library#bind.28.29|<tt>bind()</tt>]]
| bind() = [[User:Red_Leader/Nasal_library#bind.28.29|<code>bind()</code>]]
| call
| call
| call() = [[User:Red_Leader/Nasal_library#call.28.29|<tt>call()</tt>]]
| call() = [[User:Red_Leader/Nasal_library#call.28.29|<code>call()</code>]]
| caller
| caller
| caller() = [[User:Red_Leader/Nasal_library#caller.28.29|<tt>caller()</tt>]]
| caller() = [[User:Red_Leader/Nasal_library#caller.28.29|<code>caller()</code>]]
| chr
| chr
| chr() = [[User:Red_Leader/Nasal_library#chr.28.29|<tt>chr()</tt>]]
| chr() = [[User:Red_Leader/Nasal_library#chr.28.29|<code>chr()</code>]]
| closure
| closure
| closure() = [[User:Red_Leader/Nasal_library#closure.28.29|<tt>closure()</tt>]]
| closure() = [[User:Red_Leader/Nasal_library#closure.28.29|<code>closure()</code>]]
| cmp
| cmp
| cmp() = [[User:Red_Leader/Nasal_library#cmp.28.29|<tt>cmp()</tt>]]
| cmp() = [[User:Red_Leader/Nasal_library#cmp.28.29|<code>cmp()</code>]]
| compile
| compile
| compile() = [[User:Red_Leader/Nasal_library#compile.28.29|<tt>compile()</tt>]]
| compile() = [[User:Red_Leader/Nasal_library#compile.28.29|<code>compile()</code>]]
| contains
| contains
| contains() = [[User:Red_Leader/Nasal_library#contains.28.29|<tt>contains()</tt>]]
| contains() = [[User:Red_Leader/Nasal_library#contains.28.29|<code>contains()</code>]]
| delete
| delete
| delete() = [[User:Red_Leader/Nasal_library#delete.28.29|<tt>delete()</tt>]]
| delete() = [[User:Red_Leader/Nasal_library#delete.28.29|<code>delete()</code>]]
| die
| die
| die() = [[User:Red_Leader/Nasal_library#die.28.29|<tt>die()</tt>]]
| die() = [[User:Red_Leader/Nasal_library#die.28.29|<code>die()</code>]]
| find
| find
| find() = [[User:Red_Leader/Nasal_library#find.28.29|<tt>find()</tt>]]
| find() = [[User:Red_Leader/Nasal_library#find.28.29|<code>find()</code>]]
| ghosttype
| ghosttype
| ghosttype() = [[User:Red_Leader/Nasal_library#ghosttype.28.29|<tt>ghosttype()</tt>]]
| ghosttype() = [[User:Red_Leader/Nasal_library#ghosttype.28.29|<code>ghosttype()</code>]]
| id
| id
| id() = [[User:Red_Leader/Nasal_library#id.28.29|<tt>id()</tt>]]
| id() = [[User:Red_Leader/Nasal_library#id.28.29|<code>id()</code>]]
| int
| int
| int() = [[User:Red_Leader/Nasal_library#int.28.29|<tt>int()</tt>]]
| int() = [[User:Red_Leader/Nasal_library#int.28.29|<code>int()</code>]]
| keys
| keys
| keys() = [[User:Red_Leader/Nasal_library#keys.28.29|<tt>keys()</tt>]]
| keys() = [[User:Red_Leader/Nasal_library#keys.28.29|<code>keys()</code>]]
| left
| left
| left() = [[User:Red_Leader/Nasal_library#left.28.29|<tt>left()</tt>]]
| left() = [[User:Red_Leader/Nasal_library#left.28.29|<code>left()</code>]]
| num
| num
| num() = [[User:Red_Leader/Nasal_library#num.28.29|<tt>num()</tt>]]
| num() = [[User:Red_Leader/Nasal_library#num.28.29|<code>num()</code>]]
| pop
| pop
| pop() = [[User:Red_Leader/Nasal_library#pop.28.29|<tt>pop()</tt>]]
| pop() = [[User:Red_Leader/Nasal_library#pop.28.29|<code>pop()</code>]]
| right
| right
| right() = [[User:Red_Leader/Nasal_library#right.28.29|<tt>right()</tt>]]
| right() = [[User:Red_Leader/Nasal_library#right.28.29|<code>right()</code>]]
| setsize
| setsize
| setsize() = [[User:Red_Leader/Nasal_library#setsize.28.29|<tt>setsize()</tt>]]
| setsize() = [[User:Red_Leader/Nasal_library#setsize.28.29|<code>setsize()</code>]]
| size
| size
| size() = [[User:Red_Leader/Nasal_library#size.28.29|<tt>size()</tt>]]
| size() = [[User:Red_Leader/Nasal_library#size.28.29|<code>size()</code>]]
| sort
| sort
| sort() = [[User:Red_Leader/Nasal_library#sort.28.29|<tt>sort()</tt>]]
| sort() = [[User:Red_Leader/Nasal_library#sort.28.29|<code>sort()</code>]]
| split
| split
| split() = [[User:Red_Leader/Nasal_library#split.28.29|<tt>split()</tt>]]
| split() = [[User:Red_Leader/Nasal_library#split.28.29|<code>split()</code>]]
| sprintf
| sprintf
| sprintf() = [[User:Red_Leader/Nasal_library#sprintf.28.29|<tt>sprintf()</tt>]]
| sprintf() = [[User:Red_Leader/Nasal_library#sprintf.28.29|<code>sprintf()</code>]]
| streq
| streq
| streq() = [[User:Red_Leader/Nasal_library#streq.28.29|<tt>streq()</tt>]]
| streq() = [[User:Red_Leader/Nasal_library#streq.28.29|<code>streq()</code>]]
| substr
| substr
| substr() = [[User:Red_Leader/Nasal_library#substr.28.29|<tt>substr()</tt>]]
| substr() = [[User:Red_Leader/Nasal_library#substr.28.29|<code>substr()</code>]]
| subvec
| subvec
| subvec() = [[User:Red_Leader/Nasal_library#subvec.28.29|<tt>subvec()</tt>]]
| subvec() = [[User:Red_Leader/Nasal_library#subvec.28.29|<code>subvec()</code>]]
| typeof
| typeof
| typeof() = [[User:Red_Leader/Nasal_library#typeof.28.29|<tt>typeof()</tt>]]
| typeof() = [[User:Red_Leader/Nasal_library#typeof.28.29|<code>typeof()</code>]]
<!-- extension functions -->
<!-- extension functions -->
| cmdarg
| cmdarg
| cmdarg() = [[List_of_Nasal_extension_functions#cmdarg.28.29|<tt>cmdarg()</tt>]]
| cmdarg() = [[List_of_Nasal_extension_functions#cmdarg.28.29|<code>cmdarg()</code>]]
| fgcommand
| fgcommand
| fgcommand() = [[List_of_Nasal_extension_functions#fgcommand.28.29|<tt>fgcommand()</tt>]]
| fgcommand() = [[List_of_Nasal_extension_functions#fgcommand.28.29|<code>fgcommand()</code>]]
| addcommand
| addcommand
| addcommand() = [[List_of_Nasal_extension_functions#addcommand.28.29|<tt>addcommand()</tt>]]
| addcommand() = [[List_of_Nasal_extension_functions#addcommand.28.29|<code>addcommand()</code>]]
| removecommand
| removecommand
| removecommand() = [[List_of_Nasal_extension_functions#removecommand.28.29|<tt>removecommand()</tt>]]
| removecommand() = [[List_of_Nasal_extension_functions#removecommand.28.29|<code>removecommand()</code>]]
| print
| print
| print() = [[List_of_Nasal_extension_functions#print.28.29|<tt>print()</tt>]]
| print() = [[List_of_Nasal_extension_functions#print.28.29|<code>print()</code>]]
| logprint
| logprint
| logprint() = [[List_of_Nasal_extension_functions#logprint.28.29|<tt>logprint()</tt>]]
| logprint() = [[List_of_Nasal_extension_functions#logprint.28.29|<code>logprint()</code>]]
| getprop
| getprop
| getprop() = [[List_of_Nasal_extension_functions#getprop.28.29|<tt>getprop()</tt>]]
| getprop() = [[List_of_Nasal_extension_functions#getprop.28.29|<code>getprop()</code>]]
| setprop
| setprop
| setprop() = [[List_of_Nasal_extension_functions#setprop.28.29|<tt>setprop()</tt>]]
| setprop() = [[List_of_Nasal_extension_functions#setprop.28.29|<code>setprop()</code>]]
| interpolate
| interpolate
| interpolate() = [[List_of_Nasal_extension_functions#interpolate.28.29|<tt>interpolate()</tt>]]
| interpolate() = [[List_of_Nasal_extension_functions#interpolate.28.29|<code>interpolate()</code>]]
| settimer
| settimer
| settimer() = [[List_of_Nasal_extension_functions#settimer.28.29|<tt>settimer()</tt>]]
| settimer() = [[List_of_Nasal_extension_functions#settimer.28.29|<code>settimer()</code>]]
| maketimer
| maketimer
| maketimer() = [[List_of_Nasal_extension_functions#maketimer.28.29_.282.11.2B.29|<tt>maketimer()</tt>]]
| maketimer() = [[List_of_Nasal_extension_functions#maketimer.28.29_.282.11.2B.29|<code>maketimer()</code>]]
| geodinfo
| geodinfo
| geodinfo() = [[List_of_Nasal_extension_functions#geodinfo.28.29|<tt>geodinfo()</tt>]]
| geodinfo() = [[List_of_Nasal_extension_functions#geodinfo.28.29|<code>geodinfo()</code>]]
| airportinfo
| airportinfo
| airportinfo() = [[List_of_Nasal_extension_functions#airportinfo.28.29|<tt>airportinfo()</tt>]]
| airportinfo() = [[List_of_Nasal_extension_functions#airportinfo.28.29|<code>airportinfo()</code>]]
| history
| history
| history() = [[List_of_Nasal_extension_functions#history.28.29_.283.1.2B.29|<tt>history()</tt>]]
| history() = [[List_of_Nasal_extension_functions#history.28.29_.283.1.2B.29|<code>history()</code>]]
| flightplan
| flightplan
| flightplan() = [[List_of_Nasal_extension_functions#flightplan.28.29|<tt>flightplan()</tt>]]
| flightplan() = [[List_of_Nasal_extension_functions#flightplan.28.29|<code>flightplan()</code>]]
| carttogeod
| carttogeod
| carttogeod() = [[List_of_Nasal_extension_functions#carttogeod.28.29|<tt>carttogeod()</tt>]]
| carttogeod() = [[List_of_Nasal_extension_functions#carttogeod.28.29|<code>carttogeod()</code>]]
| geodtocart
| geodtocart
| geodtocart() = [[List_of_Nasal_extension_functions#geodtocart.28.29|<tt>geodtocart()</tt>]]
| geodtocart() = [[List_of_Nasal_extension_functions#geodtocart.28.29|<code>geodtocart()</code>]]
| parsexml
| parsexml
| parsexml() = [[List_of_Nasal_extension_functions#parsexml.28.29|<tt>parsexml()</tt>]]
| parsexml() = [[List_of_Nasal_extension_functions#parsexml.28.29|<code>parsexml()</code>]]
| resolvepath
| resolvepath
| resolvepath() = [[List_of_Nasal_extension_functions#resolvepath.28.29|<tt>resolvepath()</tt>]]
| resolvepath() = [[List_of_Nasal_extension_functions#resolvepath.28.29|<code>resolvepath()</code>]]
| rand
| rand
| rand() = [[List_of_Nasal_extension_functions#rand.28.29|<tt>rand()</tt>]]
| rand() = [[List_of_Nasal_extension_functions#rand.28.29|<code>rand()</code>]]
| srand
| srand
| srand() = [[List_of_Nasal_extension_functions#srand.28.29|<tt>srand()</tt>]]
| srand() = [[List_of_Nasal_extension_functions#srand.28.29|<code>srand()</code>]]
| md5
| md5
| md5() = [[List_of_Nasal_extension_functions#md5.28.29_.283.1.2B.29|<tt>md5()</tt>]]
| md5() = [[List_of_Nasal_extension_functions#md5.28.29_.283.1.2B.29|<code>md5()</code>]]
| abort
| abort
| abort() = [[List_of_Nasal_extension_functions#abort.28.29|<tt>abort()</tt>]]
| abort() = [[List_of_Nasal_extension_functions#abort.28.29|<code>abort()</code>]]
| #default = [[{{#if: {{{page|}}} <!-- is it on a different page?
| #default = [[{{#if: {{{page|}}} <!-- is it on a different page?
-->| {{{page}}} <!-- yes  
-->| {{{page}}} <!-- yes  
-->| {{FULLPAGENAME}} }} <!-- no, it's on the page that the template is on
-->| {{FULLPAGENAME}} }} <!-- no, it's on the page that the template is on
-->#{{{api}}}|<tt>{{{api}}}</tt>]]<!--  
-->#{{{api}}}|<code>{{{api}}}</code>]]<!--  


-->}}<!-- end #switch:
-->}}<!-- end #switch:
Line 134: Line 134:


== Examples ==
== Examples ==
  <nowiki>{{Func link|api=maketimer()}} is available in FG 2.11+</nowiki>
  <nowiki>{{Func link|api=maketimer}} is available in FG 2.11+</nowiki>


{{Func link|api=maketimer()}} is available in FG 2.11+
{{Func link|api=maketimer}} is available in FG 2.11+


  <nowiki>See also {{Func link|api=http.load()|page=List_of_Nasal_extension_functions}}.</nowiki>
  <nowiki>See also {{Func link|api=http.load()|page=List_of_Nasal_extension_functions}}.</nowiki>

Revision as of 08:53, 4 February 2015

The following template description is not displayed when the template is inserted in an article.

Goal

This template can be used to add a link to the documentation of a Nasal API function. It can also be used for others (for example C++ functions) and can link to external sites.

Usage

{{Func link|api|page|ext}}

All parameters except api are optional

api
Name of the function to link to.
page
Link to another wiki page, for example Help:Template.
ext
External link to another site. Overrides page.

Examples

{{Func link|api=maketimer}} is available in FG 2.11+

maketimer() is available in FG 2.11+

See also {{Func link|api=http.load()|page=List_of_Nasal_extension_functions}}.

See also http.load().

{{Func link|api=printf()|ext=http://en.wikipedia.org/wiki/Printf_format_string}}

printf()