[fpc-pascal] Re: StrUtils.RomanToInt oddities
Bart
bartjunk64 at gmail.com
Tue Sep 24 08:57:25 CEST 2013
On 9/23/13, Martin <lazarus at mfriebe.de> wrote:
> So the question is, what does or should do RomanToInt for invalid input?
Probably return 0.
Romans seemed to have no zero at all.
It also will not break backwards compatibility, current
implementatiosn returns zero if an invalid character is found (docs
say otherwise though).
We could also leave things as they are and have a new
TryRomanToIntStrict() function added to StrUtils.
Bart
More information about the fpc-pascal
mailing list