Cool, I can't wait to start putting roman numeral dates on all my projects !!!!!
<evil grin> .....course if I do that I'll need the reverse subr so I can tell what date something is. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of David A. Green Sent: Wednesday, October 18, 2006 15:45 To: u2-users@listserver.u2ug.org Subject: RE: [U2] Roman Numerals Kevin this works great! Except for invalid data like when NUM equals 0, null or a negative. I'm going to convert it to a function, which will work better for my need. Thanks, David A. Green DAG Consulting -----Original Message----- >Does any one have a Digit to Roman Numeral converter they would like to share? How about this? I just whipped this up on your request using information from http://www.novaroma.org/via_romana/numbers.html . That was kinda fun! SUBROUTINE ROMAN.NUMERALS(NUM,ROMA) * * Written By: Kevin King * Date: 18 Oct 2006 * Project: Basic Entertainment * Description: This subroutine will convert a number (NUM) to Roman numerals * (ROMA). * ********************************************************************** ******* * Modifications ********************************************************************** ******* * Date..... Changed By..... Description of Change.......................... * DIVISORS = '1000,900,500,400,100,90,50,40,10,9,5,4,1' NUMERALS = 'M,CM,D,CD,C,XC,L,XL,X,IX,V,IV,I' * THIS.NUM = NUM ROMA = '' * LOOP UNTIL (THIS.NUM EQ 0) DO DONE = @FALSE FOR DIVISOR.LOOP = 1 TO 13 UNTIL DONE DIVISOR = FIELD(DIVISORS,',',DIVISOR.LOOP) IF (THIS.NUM GE DIVISOR) THEN ROMA := FIELD(NUMERALS,',',DIVISOR.LOOP) THIS.NUM -= DIVISOR DONE = @TRUE END NEXT DIVISOR.LOOP REPEAT * RETURN ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/