For example like so.
x = 10;
xi = 11;
xv = 15;
Is there an automated way to spit these numbers out maybe 1-1000.
The reasons I will say it is "poor advice to assign roman numerals as top variables", is that it forces you to name the variable through strings operations, you end up with meaningless variable names (hard to debug) and in a functional programming language like Mathematica, you should be avoiding variables anyhow.
In this answer Leonid Shifrin writes
Using strings and subsequently
ToString
-ToExpression
just to generate variable names is pretty much unacceptable, or at the very least should be the last thing you try. I don't know of a single case where this couldn't be replaced with a better solution. [...] The general [reason] is that they lead us outside of the symbolic world, and involve parsing, which is bad both for performance reasons and also just because one should avoid parsing as much as possible (for example, it may be unsafe).
The idea of using roman numerals for variables suggests there will be many variables following that pattern. If what you need is indexed variables, there are other better solutions. Otherwise, these will be just meaningless variable names, which only hinder you and other people trying to understand the code.
I think it would be better to exploit the functional style of Mathematica and avoid leaving lingering variable definitions. See this question about keeping the kernel clean.
RomanNumeral
will produce roman numeral representation for a given integer as a string. So, you could do something like Symbol[RomanNumeral[6]]
or Symbol[ToLowerCase@RomanNumeral[6]]
. Whether this is a good idea depends on context. My initial knee jerk reaction is that, no, it's not a good idea, but there may be a context in which it makes sense.
RomanNumeral[]
already? ConsiderSymbol[ToLowerCase[RomanNumeral[15]]]
... $\endgroup$