DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
ANSI implementation-defined behavior

Environment

This section describes the implementation-defined characteristics of the execution environment. It corresponds to section ``F.3.2 Environment'' of the ANSI document.

Arguments to main()

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.

Interactive devices

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.


Next topic: Identifiers
Previous topic: Translation

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003