/[MITgcm]/MITgcm_contrib/cg2d_bench/utils.F
ViewVC logotype

Contents of /MITgcm_contrib/cg2d_bench/utils.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Fri May 12 22:34:55 2006 UTC (17 years, 11 months ago) by ce107
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -0 lines
Added CVS Id tag

1 C $Id$
2 C-- File utils.F: General purpose support routines
3 C-- Contents
4 C-- IFNBLNK - Returns index of first non-blank string character.
5 C-- ILNBLNK - Returns index of last non-blank string character.
6
7
8 CStartOfInterface
9 INTEGER FUNCTION IFNBLNK( string )
10 C /==========================================================\
11 C | FUNCTION IFNBLNK |
12 C | o Find first non-blank in character string. |
13 C \==========================================================/
14 C
15 CHARACTER*(*) string
16 CEndOfInterface
17 C
18 INTEGER L, LS
19 C
20 LS = LEN(string)
21 IFNBLNK = 0
22 DO 10 L = 1, LS
23 IF ( string(L:L) .EQ. ' ' ) GOTO 10
24 IFNBLNK = L
25 GOTO 11
26 10 CONTINUE
27 11 CONTINUE
28 C
29 RETURN
30 END
31
32 CStartOfInterface
33 INTEGER FUNCTION ILNBLNK( string )
34 C /==========================================================\
35 C | FUNCTION ILNBLNK |
36 C | o Find last non-blank in character string. |
37 C \==========================================================/
38 CHARACTER*(*) string
39 CEndOfInterface
40 INTEGER L, LS
41 C
42 LS = LEN(string)
43 ILNBLNK = LS
44 DO 10 L = LS, 1, -1
45 IF ( string(L:L) .EQ. ' ' ) GOTO 10
46 ILNBLNK = L
47 GOTO 11
48 10 CONTINUE
49 11 CONTINUE
50 C
51 RETURN
52 END

  ViewVC Help
Powered by ViewVC 1.1.22