[fpc-pascal] Re: StrUtils.RomanToInt oddities

Marco van de Voort marcov at stack.nl
Tue Sep 24 09:09:00 CEST 2013


In our previous episode, Bart said:
> > Raise an exception
> 
> This will break existing implementations that either expect IM to be
> 999, or ABC to be 0 (indicating failure), and that certainly do not
> expect that this function throws an exception at them.

Yes, but since the routine probably has low utilisation I choose for
structuring all conversion routines all the same.

Moreover I don't think that first attempts should fixate interfaces
and behaviour forever.
 
And let's not beat about the bush: the main reason for the routine is to
show beginning programmers that their homework can be done using a fixed
function :-)



More information about the fpc-pascal mailing list