1
C @(#)alpha.for 19.1 (ES0-DMD) 02/25/03 14:27:33
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
SUBROUTINE ALPHA(A,LENGTH,NCHAR,NREST)
31
C.PURPOSE: Alphanumeric handling routine
32
C.AUTHOR: Rein H. Warmels
34
C.VERSION: 87???? RHW creation
35
C.VERSION: 910115 RHW IMPLICIT NONE added
38
CHARACTER*(*) A ! IN: input array of dimension n
39
INTEGER LENGTH ! IN: max length of the character string
40
INTEGER NCHAR ! OUT: number of actual characters
41
INTEGER NREST ! OUT: number of remaining characters
49
X = A(LENGTH-I+1:LENGTH-I+1)
51
NCHAR = LENGTH + 1 - I
52
NREST = LENGTH - NCHAR
61
SUBROUTINE LENBUF(BUF,L)
63
C.PURPOSE: counts the number of effective characters in a buffer
64
C.AUTHOR: Rein H. Warmels
66
C.VERSION: 880205 RHW Creation
67
C.VERSION: 910115 RHW IMPLICIT NONE added
70
CHARACTER*(*) BUF ! IN : character string with text
71
INTEGER L ! OUT: number of characters in string
78
IF (BUF(LB:LB).NE.' ' .OR. LB.EQ.0) GO TO 200
87
INTEGER FUNCTION LENC(C)
89
C.PURPOSE: counts the number of effective characters in a buffer
90
C.AUTHOR: Rein H. warmels
92
C.VERSION: 880205 RHW Creation
93
C.VERSION: 910115 RHW IMPLICIT NONE added
96
CHARACTER*(*) C ! IN: string containing the text
100
DO 10 I = LEN(C),1,-1
102
IF(C(I:I).NE.' '.AND.ICHAR(C(I:I)).NE.0) GOTO 11