[fpc-pascal] getopts unit vs CustApp parameter handling

Michael Van Canneyt michael at freepascal.org
Tue May 3 12:02:51 CEST 2016



On Tue, 3 May 2016, Graeme Geldenhuys wrote:

> Hi,
>
> Is the getopts unit deprecated or not recommended for usage?

It is not deprecated.

> The reason
> I ask is because I see CustApp has similar functionality to the getopts
> unit, but the custapp has it’s own implementation - it doesn’t use the
> getopts unit at all.

Correct. getopts is roughly based on the unix getopts mechanism.

>
> Or am I not understanding the purpose of the getopts unit correctly?

They serve the same purpose, but function differently.

Simply use the one whose interface you like best.

Michael.


More information about the fpc-pascal mailing list