[fpc-pascal] Get highest element of a StringList

Martin Wynne martin at 85a.uk
Mon Sep 12 15:34:15 CEST 2022


On 12/09/2022 14:16, James Richters via fpc-pascal wrote:
> The problem with the for in loop is that I need the index.

Hi James,

You don't need a loop for that:

  index:=MyStringlist.IndexOfName;

see: 
https://www.freepascal.org/docs-html/rtl/classes/tstrings.indexofname.html

martin.


More information about the fpc-pascal mailing list