|
|
This section describes the implementation-defined characteristics of the execution environment. It corresponds to section ``F.3.2 Environment'' of the ANSI document.
The function main can have zero or two arguments, and is declared as follows:
int main( void) int main( int argc, char *argv[] )argc will always be greater than or equal to 1.
argv[0] contains the pathname by which the program invoked was executed.
argv[1] through argv[argc - 1] contain the exact strings as supplied to exec. No transformations on the arguments are performed by exec although the shell may transform the arguments.
The input and output dynamics of an interactive device are specified by the standard. An interactive device is defined by the UNIX system, typically the console and terminals.