[fpc-devel] widestrings length problem

Jesus Reyes jesusrmx at yahoo.com.mx
Sun Jan 29 05:53:23 CET 2006


It seems something is wrong in widestrings, using the following program:

{$mode objfpc}{H+}
program test_widestrings;
var
  W: WideString;
begin
  W := '123456';
  if Length(W)<>6 then
    WriteLn('Test1 Failed, it''s ', Length(W))
  else
    WriteLn('Test1 Passed');    

  SetLength(W, 6);
  if Length(W)<>6 then
    WriteLn('Test2 Failed, it''s ', Length(W))
  else 
    WriteLn('Test2 Passed');
end.

It prints:
Test1 Passed
Test2 Failed, it's 12

Windows, FPC 2.1.1 revision 2214

Jesus Reyes A.

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 



More information about the fpc-devel mailing list