Debian Codegraph @

doc/src/intrinsics/misc/command_argument_count.md

raw
1 # command_argument_count(): Number of Command Line Arguments
2
3 Get number of command line arguments.
4
5 ## Declaration
6
7 ### Syntax
8
9 ```fortran
10 retval = command_argument_count()
11 function command_argument_count()
12 ```
13
14 ### Arguments
15
16 None.
17
18 ### Return values
19
20 The return value is of integer type and of default kind.
21
22 ## Description
23
24 **command_argument_count()** returns the number of arguments passed on the
25 command line when the named program was invoked.
26
27 ## Types
28
29 Any.
30
31 ## Examples
32
33 ```fortran
34 program intrinsics_command_argument_count
35 implicit none
36 print *, command_argument_count()
37 end program
38 ```
39
40 **Result:**
41
42 ```
43 intrinsics_command_argument_count a b
44 2
45 ```
46
47 ## See Also