command_argument_count
- Date:
09-12-2012
NAME
command_argument_count - Returns the number of command line arguments
SYNOPSIS
icmdargs = command_argument_count()
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran 2008
DESCRIPTION
The command_argument_count intrinsic function returns the number of arguments passed to the application that calls this intrinsic. If no command line arguments were passed to the application, the intrinsic returns zero. The name of the application is not part of the returned argument count.
The icmdargs variable must be of default integer type.
EXAMPLES
The following example can be inserted into your application to return the number of arguments passed to your application:
program getcount
integer icmdargs
icmdargs = command_argument_count()
print *,'number of command arguments =',icmdargs
end program
SEE ALSO
get_command(3i), get_command_argument(3i), get_environment_variable(3i)