Hi, Case of string evaluation seems to have changed from 3.0.4 to trunk.
program Project1; {$mode objfpc} {$h+} var s: string; begin repeat readln(s); case s of 'Hello', 'Hello2': writeln('In Hello'); 'a'..'z': writeln('In ''a''..''z'''); else writeln('In else'); end; until (s = ''); end. 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? Bart _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel