On 3/5/16, Marcou Gilles <g.mar...@unistra.fr> wrote:
> I checked the AnsiCompareStr value between these two string and found > that the same unit compiled into one application give the value 16 and > compiled into the other application, it return the value -28. {$apptype console} {$ifdef fpc} {$mode objfpc} {$h+} //{$codepage utf8} {$endif} uses SysUtils; var S1,S2: AnsiString; begin S1 := 'C-C'; S2 := 'C=C'; writeln('AnsiCompareStr(''C-C'',''C=C'') = ',ansicomparestr(S1,S2)); end. C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc test.pas Free Pascal Compiler version 3.0.0 [2015/11/16] for i386 Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling test.pas Linking test.exe 16 lines compiled, 2.5 sec, 64048 bytes code, 4052 bytes data C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test AnsiCompareStr('C-C','C=C') = 1 (Same result with fpc 2.6.4) Bart _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal