Разговор о модулу:ConvertNumeric

message: Converts a given integer to its English text representation. Accepts integers (including negative and zero), decimal numbers, and scientific notation. Any value not matching these is evaluated as an expression and the result is used. Any value with magnitude less than 1000 quadragintillion (10126) is supported, as well as some larger numbers such as one centillion (10303) and one millinillion (103003).
=== Examples ===
*{{#invoke:ConvertNumeric | numeral_to_english | -123456789.25 }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 5E30 | case=u | ord=on | lk=on }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 57000 | round=on | plural=on}}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 35 + 42 | adj=on }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 3+1/2 }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 3 | numerator = 1 | denominator = 2 }}
*:
=== Optional parameters ===
;numerator
;denominator: both necessary for fractions
;case: Set to "U" or "u" to capitalize result
;sp: Set to "us" to remove "and" between hundreds and tens places
;adj: Hyphenate
;ord: Ordinal (e.g. first instead of one)
;pl: Plural
;lk: If set to 'on', will link the words "billion" and larger to their respective short-scale article sections. This might be helpful for disambiguation. Subsets of words can be linked to by specifying them, e.g. lk=trillion will link only "trillion", and lk=trillion,quadrillion will link only those two.
;negative: Sets the word to use for negative if the supplied value is negative (e.g. negative or minus)
;round: If set to 'on', will round the number to the nearest one- or two-word integer. |round=down and |round=up are similar but round down and up respectively.
thread_title:  numeral_to_english 

message: *{{#invoke:ConvertNumeric | numeral_to_english | -123456789.25 }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 5E30 | case=u | ord=on | lk=on }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 57000 | round=on | plural=on}}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 35 + 42 | adj=on }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 3+1/2 }}
*:
*{{#invoke:ConvertNumeric | numeral_to_english | 3 | numerator = 1 | denominator = 2 }}
*:
thread_title:  Examples 

message: ;numerator
;denominator: both necessary for fractions
;case: Set to "U" or "u" to capitalize result
;sp: Set to "us" to remove "and" between hundreds and tens places
;adj: Hyphenate
;ord: Ordinal (e.g. first instead of one)
;pl: Plural
;lk: If set to 'on', will link the words "billion" and larger to their respective short-scale article sections. This might be helpful for disambiguation. Subsets of words can be linked to by specifying them, e.g. lk=trillion will link only "trillion", and lk=trillion,quadrillion will link only those two.
;negative: Sets the word to use for negative if the supplied value is negative (e.g. negative or minus)
;round: If set to 'on', will round the number to the nearest one- or two-word integer. |round=down and |round=up are similar but round down and up respectively.
thread_title:  Optional parameters 

message: This takes a string and converts all the decimal sequences in it to hex.
{{#invoke:ConvertNumeric|decToHex|10 20 40 1024 78912345|minlength=4}}
produces
thread_title:  decToHex 

message: Hi, I wanted to use this function in a module I'm working on (Module:Sandbox/Bility/SortName), but it doesn't appear to be exposed publicly. Is that right, or could I just not figure out how to access it using require ('Module:ConvertNumeric')? For now I've copy/pasted it into my module. — Bility (talk) 22:23, 11 April 2013 (UTC)
thread_title:  roman_to_numeral