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