Jump to content

Module:Sandbox/Luis150902/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Created page with '<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> == Usage == <nowiki>{{</now...'
 
No edit summary
Line 2: Line 2:
== Usage ==
== Usage ==


<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''}}
<nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''|''args''}}


, where ''function_name'' is "f" followed by a natural number.
, where ''function_name'' is "f" followed by a natural number (N) and args is a pipe-separated list of arguments.

=== N = 1 ===

Gets the length, in characters, of the first argument.

=== N = 2 ===

Counts its arguments.

=== N = 3 ===

Performs the operation specified by the first argument in the remaining arguments.

Available operations: [+|"+"], [-|"-"], [*|"*"], [/|"/"], [Modulus|"%"], "!" ([[boolean]] NOT).


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |

Revision as of 16:58, 23 September 2015

Usage

{{#invoke:Sandbox/Luis150902|function_name|args}}

, where function_name is "f" followed by a natural number (N) and args is a pipe-separated list of arguments.

N = 1

Gets the length, in characters, of the first argument.

N = 2

Counts its arguments.

N = 3

Performs the operation specified by the first argument in the remaining arguments.

Available operations: [+|"+"], [-|"-"], [*|"*"], [/|"/"], [Modulus|"%"], "!" (boolean NOT).