[fpc-pascal] Re: StrUtils.RomanToInt oddities

Alberto Narduzzi albertonarduzzi at yahoo.com
Mon Sep 23 23:41:03 CEST 2013


> So the question is, what does or should do RomanToInt for invalid input?
>
> It is NOT called "CheckValidRoman", so it could be that the result for
> invalid input is simply undefined. If it is, then all is ok.

so, what does "10AT" (or "$10AT" for tht matter) return for HexToDec??? 
maybe NaN, if there is such a definition in Pascal??? Looks acceptable 
to me.

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



More information about the fpc-pascal mailing list