[fpc-devel] Case of string
Alexander Klenin
klenin at gmail.com
Fri Apr 27 04:57:01 CEST 2018
On Fri, Apr 27, 2018 at 4:29 AM, Bart <bartjunk64 at gmail.com> wrote:
> Hi,
>
> With 3.0.4 when the inout is 'qwerty' the output is 'In 'a'..'z'.
>
> In trunk (r37889) the output will be:
> 'In Hello' for 'Hello' and 'Hello2'
> 'In 'a'..'z' only when the inout is 'a'
> 'In else' for every other input.
>
> The 3.0.4 behaviour makes sense to me:( 'qwerty' > 'a') evaluates to
> TRUE, as does ('qwerty' < 'z').
> This might be unexpected to the programmer, but to me this indicates
> using ranges with case of string is a bit dangerous.
>
> The trunk behaviour makes no sense to me at all.
>
> Is this a bug, or was it changed by design?
> If the latter, why?
>
Since I was involved in the design and implementation of 'case of string',
I can confirm that this change breaks original intent.
--
Alexander S. Klenin
More information about the fpc-devel
mailing list