MEťŇ
)Decimal Number to Roman Numeral ConverterôDÖ=Wâ@L4ŕ?˙â@e\Ô(é˙ď?â@ ˇâ@DThis Macro converts an integer between 0 and 999 to a Roman Numeral.TT)Enter a decimal number between 0 and 999.TN6T999TN5T0T}3FFFCenterCenterEnter a number between 0 and 999.TTT7Convert the decimal number to Text String Variable T10.T TGDetermine the length of the decimal number and store this value in N11.T}
T"See if the decimal number is Zero.TN-10T;Text String Variable T51 will hold the Roman Numeral Value.T|20TPIf the decimal number is greater than zero, begin conversaion to Roman Numerals.TTdInteger N12 is used as a pointer to examine each character of the decimal number from left to right.T}0TXInteger N11 is a counter that tracks the number of times the following loop is repeated.TN1T0TTF1TN-11T|IT|IIT|IIIT|IVT|VT|VIT|VIIT|VIIIT|IXTTN-12T|XT|XXT|XXXT|XLT|LT|LXT|LXXT|LXXXT|XCTTN-13T|CT|CCT|CCCT|CDT|DT|DCT|DCCT|DCCCT|CMTToExamine each digit of the decimal number from left to right and store that digit into Text String Variable T11.T
FT1T
T
F1TT-11T2TTT-12T2TTT-13T2TTT-14T2TTT-15T2TTT-16T2TTT-17T2TTT-18T2TTT-19T2TTTTTTTTTTTTCreate Text Box animation.T}338T}260TN1T278T6T3CenterCenter00%N5%00%N6%000TTF6TTF6TT4Display the answer held in Text String Variable T51.T6T1CenterCenter000278000200000% Decimal to Roman Numeral Conversion
Decimal Number: %N1%
Roman Numeral: %T51%TRoman Numerals
Milton W. Shepperd
What it does:
As a physician I have written a macro to assist me in writing prescriptions. In the prescription writing process I must convert Decimal Numbers to Roman Numerals. This macro will convert a whole Decimal Number between 0 and 999 to Roman Numerals and display the result in an animated text box. To install:
Download the macro file umromannumerals.mex and save it to your hard drive in the folder where you store your macro file(s). Import the macro into your existing macro file by clicking File | Import | Macros.
To use:
Run the macro by pressing Ctrl+Alt+Shift+R. You are asked to enter a number between 0 and 999. The number you enter is displayed in roman numerals.
Limitations:
This only supports numbers up to 999.
Submitted by:
Milton W. Shepperd\B
B