~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to contrib/pepsys/libsrc/match.for

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
C @(#)match.for 19.1 (ES0-DMD) 02/25/03 13:28:46
 
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: 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 
 
26
C                       GERMANY
 
27
C===========================================================================
 
28
C
 
29
C  @(#)match.for        19.1  (ESO-IPG)  02/25/03  13:28:46
 
30
      FUNCTION MATCH(WORD,KEY)
 
31
C
 
32
C       Copyright (C) Andrew T. Young, 1990
 
33
C
 
34
C   MATCH IS .TRUE. IF WORD MATCHES KEY.    Aug.10,1989
 
35
C
 
36
C
 
37
      IMPLICIT NONE
 
38
C
 
39
      INTEGER L1,L2,LWORD
 
40
C
 
41
      LOGICAL MATCH
 
42
      CHARACTER*(*) WORD, KEY
 
43
      CHARACTER*10 W1,W2
 
44
C
 
45
      W1=' '//WORD
 
46
      L1=LWORD(W1)
 
47
      IF(L1.EQ.0) GO TO 9
 
48
      W2=' '//KEY
 
49
      L2=LWORD(W2)
 
50
      IF (L1.LT.L2) THEN
 
51
        IF(INDEX(W2(:L2),W1(:L1)).GE.1)THEN
 
52
       MATCH=.TRUE.
 
53
       RETURN
 
54
        END IF
 
55
      ELSE
 
56
        IF(INDEX(W1(:L1),W2(:L2)).GE.1)THEN
 
57
       MATCH=.TRUE.
 
58
       RETURN
 
59
        END IF
 
60
      END IF
 
61
C  NO MATCH.
 
62
    9 MATCH=.FALSE.
 
63
      RETURN
 
64
      END