[Lazarus] Parsing command line options

J.A. de Vries hdv.jadev at gmail.com
Fri Sep 21 11:44:24 CEST 2012

On 2012-09-10 23:37, J.A. de Vries wrote:

> You might be right. I seem to remember that the native perl
> implementation of getopts parses the argumentstring as a plain string
> and builds from that. I could be wrong though. I'll look it up later
> this week, as soon as I can find the time.

As promised I looked it up and as far as I can see the perl module
Getopt does indeed do its own parsing.

See /usr/share/perl/5.14.2/Getopt/Long.pm (or the equivalent path under
Windows) if anyone is interested to see how John Vromans has solved the
problem of parsing commandline areguments without resorting to
Unix-isms. Perl and this module are platform independent, so I presume
the code might contain some useful hints for Lazarus too.

Grx HdV

More information about the Lazarus mailing list