Posts: 309
Threads: 15
Joined: Jul 2003
So Aga, why don't you show us your method, and test the two methods for performance (You might also test the method that Neo mentioned: LEN(STR$(n&)) - 2 ).
hrist Jesus came into the world to save sinners, of whom I am first.(I Timothy 1:15)
For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)
Posts: 3,368
Threads: 195
Joined: Jan 2003
oh it is a long story.
You see, "I", "i", "x", "X", "C", "c", "M", and "m" all have a certain number associated with them: 0, 1, 2, 3, 4, 5, or 6. I can find that number by first getting the array values of the ASC() of the string, which would give 1, 10, 100, 1000, 10000, 100000, or 1000000 and then using LOG to get the number of zeroes.
Or I can just directly use another array utilizing ASC() of the string.
Or maybe I don't even need these values at all. This is for checking the right syntax in a Roman numeral, you see.. Maybe I can redesign it a bit more.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 1,080
Threads: 87
Joined: Feb 2002
If I'm not wrong, the roman numbers are not case sensitive,
which means that you don't need different entries for f.ex.
"c" and "C" if you use UCASE$ and/or LCASE$.
/post]
Posts: 3,368
Threads: 195
Joined: Jan 2003
Yes they are, at least in my program: uppercase shows up as an uppercase Roman Numeral with a bar and lowercase shows up as an uppercase Roman Numeral..
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.