optarg
is set which is a string representing the the value of the argument. This value can be retrieved by the caller using the Optarg property. If an invalid option is found, an error message is printed and a '?
' is returned. The name of the invalid option character can be retrieved by calling the Optopt
property. When there are no more options to be scanned, this method returns -1. The index of first non-option element in argv can be retrieved with the Optind property. public getopt ( ) : int | ||
return | int |