command_argument_count(): Number of Command Line Arguments

Get number of command line arguments.

Declaration

Sintaxe

retval = command_argument_count()
function command_argument_count()

Argumentos

Nenhum.

Valores de retorno

The return value is of integer type and of default kind.

Descrição

command_argument_count() returns the number of arguments passed on the command line when the named program was invoked.

Tipos

Qualquer um.

Exemplos

program intrinsics_command_argument_count
    implicit none
	print *, command_argument_count()
end program

Resultado:

intrinsics_command_argument_count a b
2

Veja Também