SUBROUTINE CAL_NARG(n)

Purpose

Return the number of command line arguments as n. The program invoked on the command line is not counted.

Input

       N/A

Output

         N: number of command line arguments          [I4]

Source Code: Platform specific Fortran 90 extension

Example

  USE STRPAK
  INTEGER(I4K) n
  CHARACTER(LEN=80) buf

  CALL CAL_NARG(n)
  WRITE(*,'(A,I1)') '! number command line arguments: ',n

  CALL CAL_GETARG(0, buf)
  WRITE(*,'(A)') '! '//BUF(:MAX(1,LENTRIM(buf)))

STOP
END

Program Output
! number command line arguments: 0
! C:\FLIB\CAL\Debug\CAL.exe

Comments


Return to FLIB webpage FLIB Manual Table of Contents FLIB Manual: SysPak

Website maintained by Rob Stewart (trebor@purdue.edu).
Last Updated: 03-Nov-1999
Disclaimer