[fpc-pascal]getopts
jordi
jordiv at catalonia.net
Mon Sep 29 10:51:10 CEST 2003
I'm trying to use the unit getopts, but something goes wrong.
In a program I get extrange results if I insert a non-option between two
options. In the example program of the unit:
next is ok.
testopt --verbose --add me --delete you
Long option : verbose
Long option : add With value : me
Long option : delete With value : you
next is ok.
testopt --verbose --add me --delete you hereiam
Long option : verbose
Long option : add With value : me
Long option : delete With value : you
Nomoptions : hereiam
but next is not ok. Non options are wrong.
testopt hereagain --verbose --add me --delete you hereiam
Long option : verbose
Long option : add With value : me
Long option : delete With value : you
Nomoptions : you hereiam
Perhaps I don't understand the working of getopts...
Thanks.
Jordi.
More information about the fpc-pascal
mailing list