Re :Roman Numerals Conversion

2010-03-26 Thread Alejandro Tejada
These code examples for converting Roman numerals, remembers me a particular example from the book "Ilustrating C" that uses arrays in a quite clever way. If any of you have 2nd Edition of this book, you could find this example in pages 56-57. Alejandro ___

Re: Re :Roman Numerals Conversion

2010-03-26 Thread Kay C Lan
On Fri, Mar 26, 2010 at 11:16 PM, Andre Garzia wrote: > > Now we should change bugzilla ids to roman numerals, everything would start > looking very official and political (we use some roman numerals for > official > stuff here in Brazil). Just imagine: > > Which enhancement request am I to give m

Re: Re :Roman Numerals Conversion

2010-03-26 Thread René Micout
Even if I am not the author of this question, I also say : thank you !! René from Paris Le 26 mars 2010 à 16:10, Francis Nugent Dixon a écrit : > Hi from Beautiful Brittany, > > Thanks to Mark, Richmond and Sarah. > > I knew you could do it !! > > -Francis > > > > > >

Re: Re :Roman Numerals Conversion

2010-03-26 Thread Andre Garzia
Folks, this is brilliant! Now we should change bugzilla ids to roman numerals, everything would start looking very official and political (we use some roman numerals for official stuff here in Brazil). Just imagine: BUG DCCCII: Fixed. :D On Fri, Mar 26, 2010 at 12:10 PM, Francis Nugent Dixon w

Re :Roman Numerals Conversion

2010-03-26 Thread Francis Nugent Dixon
Hi from Beautiful Brittany, Thanks to Mark, Richmond and Sarah. I knew you could do it !! -Francis ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription prefe

Re: Roman Numerals Conversion

2010-03-26 Thread Kay C Lan
Here's my version function rom2Ara theNumber constant i=1,v=5,x=10,l=50,c=100,d=500,m=1000 put 0 into tTotal put 1000 into tLastChar repeat for each char tChar in theNumber put value(tChar) into tNum -- how unfortunate if (tNum > tLastChar) then subtract (2*tLastCh

Re: Roman Numerals Conversion

2010-03-25 Thread Sarah Reichelt
> I've searched around, and have found many > scripts in many languages for converting > Roman Numerals into Numbers, but couldn't > find one that I can use in a Rev Stack. Here is the version I wrote some time ago: function romanToDecimal pRoman -- I had this table stored in a CP, but I put i

Re: Roman Numerals Conversion

2010-03-25 Thread Richmond Mathewson
On 25/03/2010 19:40, Mark Schonewille wrote: Oops, too quick The second line of the script should be put "1,5,10,50,100,500,1000" into myArabs function romanToArab theNumber put "i,v,x,l,c,d,m" into myRomans put "1,5,10,50,100,500,1000" into myArabs put item itemoffse

Re: Roman Numerals Conversion

2010-03-25 Thread Mark Schonewille
Oops, too quick The second line of the script should be put "1,5,10,50,100,500,1000" into myArabs function romanToArab theNumber put "i,v,x,l,c,d,m" into myRomans put "1,5,10,50,100,500,1000" into myArabs put item itemoffset(last char of theNumber,myRomans) of myArabs

Re: Roman Numerals Conversion

2010-03-25 Thread Mark Schonewille
Francis, function romanToArab theNumber put "i,v,x,l,c,d,m" into myRomans put "1,5,10,50,100,1000,1" into myArabs put item itemoffset(last char of theNumber,myRomans) of myArabs into myNumber repeat with x = (number of chars of theNumber - 1) down to 1 put ite