Damned ! var Comp : function(const s1, s2: string): Boolean; begin if CheckB…
Posted by jpluimers on 2018/01/10
One of my main gripes about lots of RTL/VCL/FMX code: conventions are often lacking.
Which means one of the below functions starts with Ansi (but does a Unicode operation) and the other has the parameters in reverse.
var
Comp: function(const s1, s2: string): Boolean;
begin
if CheckBox1.Checked then
Comp := ContainsText
else
Comp := AnsiStartsText;
end;
–jeroen
source: [WayBack] Damned ! var Comp : function(const s1, s2: string): Boolean; begin if CheckB… – Paul TOTH +






rvelthuis said
These functions are (still) called
AnsiXXXfor reasons of backward compatibility. They got theAnsiprefix to indicate they use the current locale, i.e. in contrast to plain ASCII.thaddy said
comp is a type. hurts my eyes…