Debian Codegraph @

install/unix/test/testf.for

raw symbols SCIP
1 C @(#)testf.for 19.1 (ES0-DMD) 02/25/03 13:52:16
2 C===========================================================================
3 C Copyright (C) 1995 European Southern Observatory (ESO)
4 C
5 C This program is free software; you can redistribute it and/or
6 C modify it under the terms of the GNU General Public License as
7 C published by the Free Software Foundation; either version 2 of
8 C the License, or (at your option) any later version.
9 C
10 C This program is distributed in the hope that it will be useful,
11 C but WITHOUT ANY WARRANTY; without even the implied warranty of
12 C MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 C GNU General Public License for more details.
14 C
15 C You should have received a copy of the GNU General Public
16 C License along with this program; if not, write to the Free
17 C Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
18 C MA 02139, USA.
19 C
20 C Corresponding concerning ESO-MIDAS should be addressed as follows:
21 C Internet e-mail: [email protected]
22 C Postal address: European Southern Observatory
23 C Data Management Division
24 C Karl-Schwarzschild-Strasse 2
25 C D 85748 Garching bei Muenchen
26 C GERMANY
27 C===========================================================================
28 C
29 C @(#)testf.for 19.1 (ESO) 02/25/03 13:52:16
30 PROGRAM TESTF
31 C
32 C.IDENT: TESTF
33 C.PURPOSE: To test if variables in subroutines are kept or
34 C reinitialized
35 C.USE : testf.exe
36 C
37 INTEGER IIN
38 INTEGER IOUT
39 C
40 IIN = 0
41 CALL INIT(IIN,IOUT)
42 IIN = 1
43 CALL INIT(IIN,IOUT)
44 C STOP
45 END
46 C
47 C
48 C
49 C
50 SUBROUTINE INIT(IN,KINIT)
51 C
52 INTEGER IN
53 INTEGER IINIT
54 INTEGER KINIT
55 INTEGER JINIT
56 DATA JINIT/12345/
57 210 FORMAT('SAVE')
58 220 FORMAT('NOSAVE')
59 C
60 IF (IN.EQ.0) THEN
61 C WRITE (6,100)
62 IINIT = JINIT
63 KINIT = -1
64
65 ELSE
66 IF (IINIT.EQ.JINIT) THEN
67 WRITE (6,210)
68 KINIT = 0
69 ELSE
70 WRITE (6,220)
71 KINIT = 1
72 ENDIF
73 ENDIF
74
75 RETURN
76 END