| << Prev | - Up - | Next >> |
This section describes how the arguments are acquired and what basic syntax is used for parsing them.
The CGI always passes arguments as name/value pairs, where the name is separated from the value by an equals sign and the individual pairs are separated by ampersands.
Boolean options option may be given as option=yes or option=no. Option names may be abbreviated, as long as they remain unambiguous.
We distinguish between long option names and single character options. Long options are given as --option or --option=value; option names may be abbreviated as long as they remain unambiguous. Single-character options are given as -x, eventually followed by a value. Several single-character options may be combined, e. g., -xy means -x -y (provided x does not take an argument). The argument to a single-character option may be attached to the option character, i. e., you can write -xvalue or -x value.
Boolean options option may be given as --option (meaning true) or --nooption (meaning false). A single hyphen - by itself is not considered to be an option and thus is returned unchanged. Parsing stops at a double hyphen -- appearing by itself; the double hyphen itself does not appear in the output.
In the case of an unrecognized long option name or single-character option, or of an ambiguous long option prefix, an error is raised.
| << Prev | - Up - | Next >> |