On 9/20/13, Reinier Olislagers <reinierolislag...@gmail.com> wrote:

> 1. I'll respond with the expected answer: "What does Delphi do" (if it
> has this function?

D7 PE does not have it.

> 2. I wouldn't be bothered by negative numbers... even the Romans used to
> have negative posessions (= debts) and they didn't have double entry
> bookkeeping yet ;) Also, the documentation [1] mentions it as a feature.

If I mention in documentationn that result is unpredicted for any
input e.g. for function StrToInt(S), because ATMI implemented it like
Result := StringOfChar(Char(Random(256)),Random(256)), then this would
also not considered to be a bug, just it because does what the docs
say?

> 3. The rest... well, depending on 1. I'd agree it's a bug.
> [1] mentions "Invalid characters are dropped from S"... which I think is
> a bit strange (S is a const) but assuming it means "Invalid characters
> in S are ignored" it means somebody thought checking the input for valid
> Roman numbers was a good idea. The question however becomes "what is the
> algorithm for deciding invalid characters" which IMO will become a mess
> very quickly. Much better to just consider the entire input as invalid.

Any invalid char in S will result in Result being 0;
So doc is wrong about that.

Bart
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to