[fpc-devel] TProcess empty parameter

Henry Vermaak henry.vermaak at gmail.com
Thu May 7 14:13:04 CEST 2015


On Thu, May 07, 2015 at 01:55:37PM +0200, Michael Van Canneyt wrote:
> On Thu, 7 May 2015, Henry Vermaak wrote:
> >On Thu, May 07, 2015 at 12:59:52PM +0200, Michael Van Canneyt wrote:
> >>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 ?

The standard also says that argv[0] to argv[argc-1] shall contain
pointers to strings.  NULL is not a pointer to a string, so that would
be a problem.

Henry



More information about the fpc-devel mailing list