[fpc-devel] TProcess and arguments with quotes
Marco van de Voort
marcov at stack.nl
Wed Sep 5 11:00:55 CEST 2012
In our previous episode, Martin said:
> That is not always possible. And the quotes work on most platforms.
Define "platform" in the context of execution. Both API and shell?
> An application may however have a list of arguments in a single string
> (e.g. the IDE ask the user to specify extra arguments. This can be 0, 1
> or many)
No problem. As long as internally you keep them apart (e.g. use a tstrings
The reason why tprocess changed to a list is to avoid the need to
concatenate arguments (and thus split them again). So in time it is urgently
recommended to follow that.
> The IDE could in that case of course try to parse the params itself, and
> try to remove the quotes. but that leaves much room for error (removing
> quotes that are meant to be passed to the app)
Do not concatenate in the first place, then there is no need for parsing.
That should at least be the long term planning.
More information about the fpc-devel