I made some blocks that convert Arabic numerals to/from Roman numerals. Converting Roman numerals to Arabic numerals was fairly simple, while going the other way around needed a bit more brainstorming because of numbers like IV. Anyway here it is:
If there is anything wrong with the algorithm I would like to know.
I remembered in the old site there was an example project about Roman numerals by jens. The code included that block. It doesn't seem to work the exact same way the combine block does though.
Oh. Well I learned Roman numerals in elementary but have seldom used them ever since so I forgot some of it. I think if a lesser number a preceded a greater number b, then it would add b - a. Or does it subtract the total from b?
You don't have the order wrong; it does what you said, b-a. But only certain combinations of A and B are allowed. Typically A has to be the power of ten closest to B but below it. So, CM, not XM or IM. (And not VM or LM or DM because those aren't powers of ten.)