command_argument_count(3f) - [FORTRAN:INTRINSIC:SYSTEM ENVIRONMENT] Get number of command line arguments
Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also
result = command_argument_count()
command_argument_count returns the number of arguments passed on the command line when the containing program was invoked.
None
The return value is of type integer(4)
Sample program:
program demo_command_argument_count integer :: count count = command_argument_count() print *, count end program demo_command_argument_countSample output:
# the command verb does not count ./test_command_argument_count 0 # quoted strings may count as one argument ./test_command_argument_count count arguments 2 ./test_command_argument_count count arguments 1
[[Fortran 2003]] and later
[[Inquiry function]]
[[get_command]], [[get_command_argument]]
command_argument_count (3) | March 18, 2019 |