On 23/09/2013 22:30, Alberto Narduzzi wrote:
What about making an option of it?

Anyhow, if the function accepts invalid combinations, what should it
return? For some, the answer would be obvious (IIII), but some
combinations are indeed ambiguous (IIIIM) So that we maybe could accept
unambiguous invalid combinations, but I don't see how to accept
ambiguous ones.

they are not ambiguous, they are simply INVALID.

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.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to