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