[fpc-devel] TStrings Add(array of string)

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Mon Apr 2 13:23:25 CEST 2012



On Sun, 1 Apr 2012, Andrew Haines wrote:

> On 04/01/12 05:13, Marco van de Voort wrote:
>> In our previous episode, Michael Van Canneyt said:
>>>> I was thinking about TStrings possibly having an overloaded function Add
>>>> or AddStrings where the argument is an array of string?
>>>>
>>>> procedure Add(strs: array of string); overload;
>>>> or
>>>> procedure AddStrings(strs: array of string); overload;
>>>>
>>>
>>> Better implement the second.
>>> AddStrings already exists for a TStrings, it is more similar in functionality.
>>
>> Maybe better extending tprocess to have a array of const function than
>> tstrings?
>> _______________________________________________
>> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
> Here are two patches that do both. One extends TStrings with AddStrings
> and the other extends TProcess with AddParams.
>
> I'll let someone else decide which is better. :)

I added the overloaded version of AddStrings.

It comes in handy for other cases as well. Rev 20691.

Michael.



More information about the fpc-devel mailing list