BSD 3 development
[unix-history] / usr / man / man3 / getarg.3f
CommitLineData
41666eb0
BJ
1.TH GETARG 3F
2.SH NAME
3getarg, iargc \- command arguments to Fortran
4.SH SYNOPSIS
5.nf
6.ft B
7subroutine getarg( argno, string )
8integer argno
9character \(**(\(**) string
10.PP
11.B iargc()
12.fi
13.ft R
14.SH DESCRIPTION
15These procedures permit Fortran programs to access the command arguments.
16The integer function
17.B iargc
18returns the number of command arguments.
19The subroutine
20.B getarg
21stores the nth command argument in its second argument.
22The string is truncated or padded with blanks,
23in accord with the rules of Fortran character assignment.
24.PP
25The command
26 go arg1 argument2
27.br
28will return 2 as the value of
29.B iargc.
30If \fBs\fR is declared character\(**4,
31then
32 call getarg(2, s)
33.br
34will put "argu" in \fBs\fR.
35.SH "SEE ALSO"
36exec(2)