[Lazarus] Parsing command line options

Marco van de Voort marcov at stack.nl
Mon Sep 10 13:18:59 CEST 2012


On Sat, Sep 08, 2012 at 10:34:37PM +0300, patspiper wrote:
> > Depends. Split arguments for TProcess use (like in the above bugreport):
> > afaik none. Simply keep all arguments separate and pass them to the
> > "parameters" propery.
> Keeping arguments separate may not be possible: 

Not *easily* possible. Not impossible.

> http://permalink.gmane.org/gmane.comp.ide.lazarus.general/64781

That's why the old option is still available "deprecated" for a while. But
no new functionality will be added. IOW it will remain compatible to how it
was when it was deprecated (2.6.0 compatible).

If you can't change it out of compatibility, this will be no problem, since
the current interface should be exactly compatible to 2.6.0 and before.
 
> However, splitting the command line with the separator being an unquoted
> space should be good enough.

No it wouldn't, since  -xx="bla" needs to be dequoted on windows (and I
assume OS/2) too.

Your message is a very good example why the whole splitting and escaping
approach was abandonned.  Every issue was considered to be "just add this,
since then it works for me now", but after multiple years of such changes,
there are still corner cases left.





More information about the Lazarus mailing list