Module:Sandbox/Squc/Roman/doc

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!

This module is intended to run through a template, which is still under construction.

To convert Roman numerals to decimal form, use, which outputs. 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. The final value will still be given in brackets after the error messages.

To force no errors, use.

To output errors directly into the text, use.

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

Errors will be combined, e.g. "XXXXXXCC" gives:

or with mode=2&#124;disp=0 (default):

The function todecimald (direct) is only intended for use in other modules. The output will be in the form (comma-separated list):
 * todecimald

The decimal will be a number, it will be the converted number if there are no errors or if it is a warning (it is invalid but still can be converted), it will be -1 if there is an error (cannot be converted). The error message is a string and will always exist, it will be  if no error is found.