[fpc-pascal] getopts unit vs CustApp parameter handling

Michael Van Canneyt michael at freepascal.org
Wed May 4 11:24:07 CEST 2016



On Wed, 4 May 2016, Graeme Geldenhuys wrote:

> On 2016-05-03 11:02, Michael Van Canneyt wrote:
>> They serve the same purpose, but function differently.
>>
>> Simply use the one whose interface you like best.
>
> I'm used to the command line parameters handling of CustApp, but none of
> my applications are TCustomApp based. Plus CustApp gives no code reuse
> regarding command line parameters code. So I refactored the code out of
> TCustomApp into an Interface and Class implementing that interface. So
> now if I need good parameter list handling I simply mix in Interface
> Delegation into any of my applications. This seems to work very well
> thus far.
>
> Would this be of interest to Free Pascal? If so, I can refactor the
> CustApp code to use the Interface too.

It would be, but you had better update your interface, various things have been added.

Michael.



More information about the fpc-pascal mailing list