My 2 cents on the "strictness" of the parsing.

Since there are various, more or less accepted, "rules", a
"strictness" parameter could be added as an optional parameter to the
function.
It does not break consistency with other conversion functions, since
they are hardly open for interpretation, and so they don't need such a
thing.

Strictness modes could be:
- Strict: most strict set of rules (it does not accept numbers>  3999,
nor more than 3 repeats of the same numeral)
- Relaxed: allows unlimited number of starting "M", and allows up to 4
repeats of C, X and I.
- DontCare: like current behaviour.

Now, this is a very nice and clean approach to the problem, together with an equally nice and clean solution.

Cheers, A.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to