Template:Func link: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Rearrange)
(finish library functions)
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}}} <tt>{{{api}}}</tt>]</span> <!-- yes, so link to that
-->| {{#switch: {{{api|error}}} <!-- nope
 
-->| {{#switch: {{{api|error}}} <!-- no, so use switch for pre-set APIs
-->| error = <big style="color:red">Missing argument!</big> <!-- error message -->
-->| error = <big style="color:red">Missing argument!</big> <!-- error message -->
<!-- pre-made links for core library Nasal APIs below -->
<!-- pre-made links for core library Nasal APIs below -->
Line 14: Line 15:
| chr
| chr
| chr() = [[User:Red_Leader/Nasal_library#chr.28.29|<tt>chr()</tt>]]
| chr() = [[User:Red_Leader/Nasal_library#chr.28.29|<tt>chr()</tt>]]
| closure
| closure() = [[User:Red_Leader/Nasal_library#closure.28.29|<tt>closure()</tt>]]
| cmp
| cmp() = [[User:Red_Leader/Nasal_library#cmp.28.29|<tt>cmp()</tt>]]
| compile
| compile() = [[User:Red_Leader/Nasal_library#compile.28.29|<tt>compile()</tt>]]
| contains
| contains() = [[User:Red_Leader/Nasal_library#contains.28.29|<tt>contains()</tt>]]
| delete
| delete() = [[User:Red_Leader/Nasal_library#delete.28.29|<tt>delete()</tt>]]
| die
| die() = [[User:Red_Leader/Nasal_library#die.28.29|<tt>die()</tt>]]
| find
| find() = [[User:Red_Leader/Nasal_library#find.28.29|<tt>find()</tt>]]
| ghosttype
| ghosttype() = [[User:Red_Leader/Nasal_library#ghosttype.28.29|<tt>ghosttype()</tt>]]
| id
| id() = [[User:Red_Leader/Nasal_library#id.28.29|<tt>id()</tt>]]
| int
| int() = [[User:Red_Leader/Nasal_library#int.28.29|<tt>int()</tt>]]
| keys
| keys() = [[User:Red_Leader/Nasal_library#keys.28.29|<tt>keys()</tt>]]
| left
| left() = [[User:Red_Leader/Nasal_library#left.28.29|<tt>left()</tt>]]
| num
| num() = [[User:Red_Leader/Nasal_library#num.28.29|<tt>num()</tt>]]
| pop
| pop() = [[User:Red_Leader/Nasal_library#pop.28.29|<tt>pop()</tt>]]
| right
| right() = [[User:Red_Leader/Nasal_library#right.28.29|<tt>right()</tt>]]
| setsize
| setsize() = [[User:Red_Leader/Nasal_library#setsize.28.29|<tt>setsize()</tt>]]
| size
| size() = [[User:Red_Leader/Nasal_library#size.28.29|<tt>size()</tt>]]
| sort
| sort() = [[User:Red_Leader/Nasal_library#sort.28.29|<tt>sort()</tt>]]
| split
| split() = [[User:Red_Leader/Nasal_library#split.28.29|<tt>split()</tt>]]
| sprintf
| sprintf() = [[User:Red_Leader/Nasal_library#sprintf.28.29|<tt>sprintf()</tt>]]
| streq
| streq() = [[User:Red_Leader/Nasal_library#streq.28.29|<tt>streq()</tt>]]
| substr
| substr() = [[User:Red_Leader/Nasal_library#substr.28.29|<tt>substr()</tt>]]
| subvec
| subvec() = [[User:Red_Leader/Nasal_library#subvec.28.29|<tt>subvec()</tt>]]
| typeof
| typeof() = [[User:Red_Leader/Nasal_library#typeof.28.29|<tt>typeof()</tt>]]
<!-- extension functions -->
| cmdarg
| cmdarg() = [[List_of_Nasal_extension_functions#cmdarg.28.29|<tt>cmdarg()</tt>]]
| fgcommand
| fgcommand() = [[List_of_Nasal_extension_functions#fgcommand.28.29|<tt>fgcommand()</tt>]]
| addcommand
| addcommand() = [[List_of_Nasal_extension_functions#addcommand.28.29|<tt>addcommand()</tt>]]
| removecommand
| removecommand() = [[List_of_Nasal_extension_functions#removecommand.28.29|<tt>removecommand()</tt>]]
| print
| print() = [[List_of_Nasal_extension_functions#print.28.29|<tt>print()</tt>]]
| logprint
| logprint() = [[List_of_Nasal_extension_functions#logprint.28.29|<tt>logprint()</tt>]]
| getprop
| getprop() = [[List_of_Nasal_extension_functions#getprop.28.29|<tt>getprop()</tt>]]
| setprop
| setprop() = [[List_of_Nasal_extension_functions#setprop.28.29|<tt>setprop()</tt>]]
| interpolate
| interpolate() = [[List_of_Nasal_extension_functions#interpolate.28.29|<tt>interpolate()</tt>]]
| settimer
| settimer() = [[List_of_Nasal_extension_functions#settimer.28.29|<tt>settimer()</tt>]]
| 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|<tt>maketimer()</tt>]]
| #default = [[<!--  no so add wikilink
| geodinfo
-->{{#if: {{{page|}}} <!-- is it on a different page?
| geodinfo() = [[List_of_Nasal_extension_functions#geodinfo.28.29|<tt>geodinfo()</tt>]]
| airportinfo
| airportinfo() = [[List_of_Nasal_extension_functions#airportinfo.28.29|<tt>airportinfo()</tt>]]
| history
| history() = [[List_of_Nasal_extension_functions#history.28.29_.283.1.2B.29|<tt>history()</tt>]]
| flightplan
| flightplan() = [[List_of_Nasal_extension_functions#flightplan.28.29|<tt>flightplan()</tt>]]
| carttogeod
| carttogeod() = [[List_of_Nasal_extension_functions#carttogeod.28.29|<tt>carttogeod()</tt>]]
| geodtocart
| geodtocart() = [[List_of_Nasal_extension_functions#geodtocart.28.29|<tt>geodtocart()</tt>]]
| parsexml
| parsexml() = [[List_of_Nasal_extension_functions#parsexml.28.29|<tt>parsexml()</tt>]]
| resolvepath
| resolvepath() = [[List_of_Nasal_extension_functions#resolvepath.28.29|<tt>resolvepath()</tt>]]
| rand
| rand() = [[List_of_Nasal_extension_functions#rand.28.29|<tt>rand()</tt>]]
| srand
| srand() = [[List_of_Nasal_extension_functions#srand.28.29|<tt>srand()</tt>]]
| md5
| md5() = [[List_of_Nasal_extension_functions#md5.28.29_.283.1.2B.29|<tt>md5()</tt>]]
| abort
| abort() = [[List_of_Nasal_extension_functions#abort.28.29|<tt>abort()</tt>]]
| #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>]] <!-- finish the link
-->#{{{api}}}|<tt>{{{api}}}</tt>]]<!--  
-->}}}}</includeonly><noinclude>{{Informative template|1=
 
-->}}<!-- end #switch:
 
-->}}<!-- end #if: --></includeonly><noinclude>{{Informative template|1=
__NOTOC__
__NOTOC__
== Goal ==
== Goal ==

Revision as of 17:55, 28 January 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 (e.g., C++ functions) and can link to external sites.

Usage

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

Note All parameter except api are optional.

api
Name of the function to link to.
page
If desired, link to another wiki page (e.g., 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()