Skip to content
Snippets Groups Projects
Commit 4f82d3c3 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

doc for get_args

Rev: doc/simulated/get_args:1.1
parent 82acdced
No related branches found
No related tags found
No related merge requests found
NAME
get_args - get the non-option arguments
SYNTAX
#include <getopt.h>
string *get_args(string *argv);
DESCRIPTION
This function returns the remaining command line arguments after
you have run find_options to find all the options in the
argument list. If there are any options left not handled by
find_options an error message will be written and the program will
exit. Otherwise a new 'argv' array without the parsed options is
returned.
EXAMPLE
int main(int argc, string *argv)
{
if(find_option(argv,"f","foo"))
werror("The FOO option was given.\n");
argv=get_args(argv);
werror("The arguments are: "+(argv*" ")+".\n");
}
SEE ALSO
find_option
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment