1
C @(#)tdforlib.for 19.1 (ES0-DMD) 02/25/03 14:11:17
2
C===========================================================================
3
C Copyright (C) 1995 European Southern Observatory (ESO)
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.
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.
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,
20
C Corresponding concerning ESO-MIDAS should be addressed as follows:
21
C Internet e-mail: midas@eso.org
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
27
C===========================================================================
29
INTEGER FUNCTION FORLOC(SA,SB)
30
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31
C.COPYRIGHT: Copyright (c) 1987 European Southern Observatory,
34
C.VERSION: 1.0 ESO-FORTRAN Conversion, AA 19:55 - 11 DEC 1987
36
C.LANGUAGE: F77+ESOext
39
C.IDENTIFICATION FORLOC.FOR
40
C.KEYWORDS FORTRAN FUNCTION
43
C Locates a character in a string.
44
C Corresponds to LIB$LOCC in VAX 11 FORTRAN.
46
C------------------------------------------------------------------
48
CHARACTER*(*) SA ! IN : character to be found
49
CHARACTER*(*) SB ! IN : string to be searched
53
C ... check string length
61
C ... compare each input character with lowercase alphabet
64
IF (SA(1:1).EQ.SB(N:N)) THEN
71
SUBROUTINE FORUPC(SA,SB)
72
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
73
C.COPYRIGHT: Copyright (c) 1987 European Southern Observatory,
76
C.VERSION: 1.0 ESO-FORTRAN Conversion, AA 19:55 - 11 DEC 1987
78
C.LANGUAGE: F77+ESOext
81
C.IDENTIFICATION FORUPC.FOR
82
C.KEYWORDS FORTRAN FUNCTION
85
C Really converts characters in the input string into uppercase.
86
C The routine corresponds to STR$UPCASE in VAX 11 FORTRAN
88
C------------------------------------------------------------------
90
CHARACTER*(*) SA ! IN : Input string
91
CHARACTER*(*) SB ! OUT : Destination string
94
CHARACTER*26 ALPHU,ALPHL
96
DATA ALPHU /'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
97
DATA ALPHL /'abcdefghijklmnopqrstuvwxyz'/
101
C compare each input character with lowercase alphabet
106
IF (SA(N:N).EQ.ALPHL(M:M)) SB(N:N) = ALPHU(M:M)
114
INTEGER FUNCTION FORSKP(SA,SB)
115
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
116
C.COPYRIGHT: Copyright (c) 1987 European Southern Observatory,
117
C all rights reserved
119
C.VERSION: 1.0 ESO-FORTRAN Conversion, AA 19:55 - 11 DEC 1987
121
C.LANGUAGE: F77+ESOext
124
C.IDENTIFICATION FORSKP.FOR
125
C.KEYWORDS FORTRAN FUNCTION
128
C Compares a string with a given character and returns the
129
C relative position of the first nonequal character as an index.
130
C The character is compared until and inequality is found or
131
C the string is exhausted. The relative position of the
132
C unequal character or zero is returned.
133
C If the source string has a zero length, then zero is returned.
134
C Corresponds to LIB$SKPC in VAX 11 FORTRAN.
136
C------------------------------------------------------------------
138
CHARACTER*(*) SA ! IN : character to be found
139
CHARACTER*(*) SB ! IN : string to be searched
143
C ... check string length
147
IF (KLEN.EQ.0) RETURN
149
IF (KLEN.EQ.0) RETURN
151
C ... compare each input character with lowercase alphabet
154
IF (SA(1:1).NE.SB(N:N)) THEN