[fpc-devel] TProcess empty parameter

Michael Van Canneyt michael at freepascal.org
Thu May 7 13:55:37 CEST 2015



On Thu, 7 May 2015, Henry Vermaak wrote:

> On Thu, May 07, 2015 at 12:59:52PM +0200, Michael Van Canneyt wrote:
>>
>>
>> On Thu, 7 May 2015, Marco van de Voort wrote:
>>
>>> In our previous episode, Michael Van Canneyt said:
>>>
>>> (on rereading the whole thread)
>>>
>>>> That is only if you use the CommandLine property.
>>>> If you use the stringlist (Parameters), no parsing is done.
>>>
>>> The mentioned routine is the tstringlist to array of pchar conversion, and
>>> afaik also applies to the separated part.
>>>
>>> Since NIL is a termination of an array of pchar in C that is not ok.
>>
>> if that were the case, argc would not have been introduced, which is
>> why I doubt the use of this argument ?
>>
>> C code that regards nil as the last element of the argv array is just wrong.
>
> The C standard says that argv[argc] shall be a null pointer.

So if argc is 15, there should be no problem to have a Nil at position 5 ?

Michael.



More information about the fpc-devel mailing list