[fpc-pascal] Get highest element of a StringList

James Richters james.richters at productionautomation.net
Sat Sep 10 18:01:20 CEST 2022


I thought I would try:

For Loop := 0 to High(MyStringList) do

But I get "Error: Type mismatch"

Is there a way to get the highest element of a stringlist other than:

For Loop := 0 to MyStringList.Count-1 do

It would be nice to not have the -1
Could High() be made to work if the argument was a stringlist?

James



More information about the fpc-pascal mailing list