logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

math::roman - Tools for creating and manipulating roman numerals

Bugs, Ideas, Feedback

       This document, and the package it describes, will undoubtedly contain bugs and  other  problems.   Please
       report  such in the category math::roman of the TcllibTrackers [http://core.tcl.tk/tcllib/reportlist].
       Please also report any ideas for enhancements you may have for either package and/or documentation.

       When proposing code changes, please provide unifieddiffs, i.e the output of diff-u.

       Note further that attachments are strongly preferred over inlined patches. Attachments  can  be  made  by
       going  to the Edit form of the ticket immediately after its creation, and then using the left-most button
       in the secondary navigation bar.

Category

       Mathematics

Commands

::math::roman::toromani
              Convert an integer to roman numerals. The result is always  in  upper  case.  The  value  zero  is
              converted to an empty string.

       ::math::roman::tointegerr
              Convert a roman numeral into an integer.

       ::math::roman::sortlist
              Sort a list of roman numerals from smallest to largest.

       ::math::roman::exprargs
              Evaluate an expression where the operands are all roman numerals.

       Of  these commands both toroman and tointeger are exported for easier use. The other two are not, as they
       could interfer or be confused with existing Tcl commands.

Description

::math::roman  is a pure-Tcl library for converting between integers and roman numerals. It also provides
       utility functions for sorting and performing arithmetic on roman numerals.

       This code was originally harvested from the Tcler's wiki at http://wiki.tcl.tk/1823 and as such  is  free
       for  any  use  for  any  purpose. Many thanks to the ingeneous folk who devised these clever routines and
       generously contributed them to the Tcl community.

       While written and tested under Tcl 8.3, I expect this library will work under all 8.x versions of Tcl.

Keywords

       conversion, integer, roman numeral

Name

       math::roman - Tools for creating and manipulating roman numerals

Synopsis

       package require Tcl8.59

       package require math::roman?1.1?::math::roman::toromani::math::roman::tointegerr::math::roman::sortlist::math::roman::exprargs

________________________________________________________________________________________________________________

See Also