Jump to content

Module:Sandbox/Squc/Roman/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Squc (talk | contribs) at 14:52, 23 July 2013 (Created page with 'This module converts Roman numerals to Decimal form, and rejects invalid ones. It can be used normally, or through another module. This is still under co...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This module converts Roman numerals to Decimal form, and rejects invalid ones. It can be used normally, or through another module. This is still under construction, check back in a few days!

To convert Roman numerals to decimal form, use {{#invoke:Sandbox/Squc/Roman/doc|todecimal|MMXIII}}, which outputs 2013. If the Roman numeral is invalid, it will throw an error. If JavaScript is enabled, you can click the Script error link, and the first sentence should show the cause of the error.

To force no errors, use {{#invoke:Sandbox/Squc/Roman/doc|todecimalf|MMXIII}}.

To use this through another module, use something like this:

local roman = require( "Module:Sandbox/Squc/Roman" )

local value = roman.todecimal( romanvariablehere )