Sponsored Content
Special Forums News, Links, Events and Announcements Software Releases - RSS News Roman Numeral Conversion API 0.0.4 (Default branch) Post 302163772 by Linux Bot on Saturday 2nd of February 2008 10:30:11 AM
Old 02-02-2008
Roman Numeral Conversion API 0.0.4 (Default branch)

ImageRoman Numeral Conversion API performs Romannumeral conversions and formats date data usingRoman numerals and Latin. The romandate command issimilar to the standard Unix date command. Theromannum command provides command line conversionto and from Roman numerals. Libroman contains the functions roman_ctime(), roman_asctime(), and roman_strftime(). These functions provide the same functionality as ctime(), asctime(), and strftime() using Roman numerals to generate the strings.License: GNU General Public License v2Changes:
The long2roman() and roman2long() were re-named to int2roman() and roman2int(), which more closely match the actual data types used by these functions. The old function names will still work. roman2int() is more strict about the Roman numeral syntax. Invalid numerals such as VX, VV, IIIII, IC, and IXI now produce an error. Romannum now auto-detects the type of conversion to perform instead of depending on a command line switch.Image

More...
 

We Also Found This Discussion For You

1. Shell Programming and Scripting

Numeral conversion in awk

I am running into conversion of string to numbers in awk that I can't understand and don't know how to deal with properly My script checks for numeric only field, I use this approach to do that: $1 + 0 == $1 It works most of the time, but in some cases it does not behave how I expect it to... (5 Replies)
Discussion started by: migurus
5 Replies
math::roman(1.0)														  math::roman(1.0)

__________________________________________________________________________________________________________________________________________________

NAME
math::roman - Tools for creating and manipulating roman numerals SYNOPSIS
package require Tcl 8.3 package require math::roman ?1.0? ::math::roman::toroman i ::math::roman::tointeger r ::math::roman::sort list ::math::roman::expr args _________________________________________________________________ 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. COMMANDS
::math::roman::toroman i Convert an integer to roman numerals. The result is always in upper case. The value zero is converted to an empty string. ::math::roman::tointeger r Convert a roman numeral into an integer. ::math::roman::sort list Sort a list of roman numerals from smallest to largest. ::math::roman::expr args 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. 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 Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
conversion, integer, roman numeral CATEGORY
Mathematics COPYRIGHT
Copyright (c) 2005 Kenneth Green <kenneth.green@gmail.com> Tcl Math Library math math::roman(1.0)
All times are GMT -4. The time now is 10:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy