[fpc-pascal] Re: StrUtils.RomanToInt oddities

Bart bartjunk64 at gmail.com
Tue Sep 24 09:01:29 CEST 2013


On 9/23/13, Alberto Narduzzi <albertonarduzzi at yahoo.com> wrote:

> But IsValidRoman is as good as a solution too, indeed...

Trying to determine if it is valid is 90% of calculating the output.
Hence my previous approach of TryRomanToInt.
It returns FALSE if the string isn't a legal Roman numeral.
And it is compliant with our other conversion routines like TryStrToInt etc.

Bart



More information about the fpc-pascal mailing list