1 Reply Latest reply on Sep 4, 2008 7:35 AM by GagnonEric

    Convert roman numerals to numbers in Apple script

      Hi,

      How to convert roman numerals to numbers in apple script. If i have roman numerals xii and i should get corresponding number for that roman numerals ie 12. How to do this in apple script. Any ideas?

      Thanks
      Jacintha
        • 1. Re: Convert roman numerals to numbers in Apple script
          GagnonEric
          The first thing would be to find the algorithm to do the conversion.

          It can be a fun challenge to find it yourself, but otherwise just to save time a quick google could point you to place talking about the problem (dont search for applescript, any langage is good as you want to find the general algorithm to do so). Type "roman to number conversion algorithm" in google by exemple.

          Read a few thread to figure out wich source seem to really adress the problem, look if it use base language feature that exist in Applescript.

          Conversion at this point should be easy.

          ps: If you are doing this for book and you want to do the conversion for the first few pages only, then using a simple mapping table (using record in applescript) could a better solution (less general but more simple to implement).