Recent

Author Topic: [SOLVED] Sorted Tstringlist not accepted some strings  (Read 1308 times)

jimbill

  • New Member
  • *
  • Posts: 11
[SOLVED] Sorted Tstringlist not accepted some strings
« on: November 19, 2017, 04:09:44 pm »
Hello Everyone,

I cant speak very well english  :)

Lazarus is very good tool.
Congratulations to the developers. And so forth

I would like to announce a strange behaviour of Tstringlist with thousands of lines.

If I would like to insert 10000 strings to a sorted TStringlist (length for each one maximum : 80 or other values) it's accepted only about 9900 strings. Why this is happening? (fpc library implementation has the issue or  I do something bad?)

I'am attaching the source code.


windows 7/32 bit  i386-win32-win32/win64

Any help welcome :).

Thanks
« Last Edit: November 19, 2017, 05:52:14 pm by kirkjake »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Sorted Tstringlist not accepted some strings
« Reply #1 on: November 19, 2017, 04:14:04 pm »
Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   random_strings,tempwrong:Tstringlist;
  4.   i,j,wrong_counter,save:integer;
  5.   generated_text:string;
  6. begin
  7.   random_strings:=TStringList.Create;
  8.   random_strings.Sorted:=true;
  9.   random_strings.Duplicates := dupAccept;
  10. .....
  11.  
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

jimbill

  • New Member
  • *
  • Posts: 11
SOLVED: Sorted Tstringlist not accepted some strings
« Reply #2 on: November 19, 2017, 04:45:41 pm »
Yes it was the problem  :)

Thanks for the solution.

 

TinyPortal © 2005-2018