Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-02

getopt

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Shifted Soul

Hello
I want to use options via the getopt unit but it was not found in the units (fpc 1.0.4 win32/go32v2/linux).
The solution was to create a getopt like unit.
I finished it with some changes :
- The options are handled from a class (TParams)
- An automatic error handling is present (duplicated, unknown ... parameters).
- Easy to implement, with only one constructor, to specify the possible parameters
and to test their presence.
and some others.
If anyone wants it, email me at :
bye

Michael Van Canneyt
to Shifted Soul
Shifted Soul wrote 12 lines
Hello I want to use options via the getopt unit but it was not found in the units (fpc 1.0.4 win32/go32v2/linux). The solution was to create a getopt like unit. I finished it with some changes : - The options are handled from a class (TParams) - An automatic error handling is present (duplicated, unknown ... parameters). - Easy to implement, with only one constructor, to specify the possible parameters and to test their presence. and some others.

You can send it to me, I'll see if I can enhance the existing getopts units (note the S at the end !). Probably it'll go in the FCL then.

Michael.