NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
jstchr.f
Go to the documentation of this file.
1 C> @file
2 C> @author WOOLLEN @date 1994-01-06
3 
4 C> THIS SUBROUTINE LEFT-JUSTIFIES (I.E. REMOVES ALL LEADING
5 C> BLANKS FROM) A CHARACTER STRING.
6 C>
7 C> PROGRAM HISTORY LOG:
8 C> 1994-01-06 J. WOOLLEN -- ORIGINAL AUTHOR (ENTRY POINT IN JSTIFY)
9 C> 1998-07-08 J. WOOLLEN -- REPLACED CALL TO CRAY LIBRARY ROUTINE
10 C> "ABORT" WITH CALL TO NEW INTERNAL BUFRLIB
11 C> ROUTINE "BORT" (IN PARENT ROUTINE JSTIFY)
12 C> 2002-05-14 J. WOOLLEN -- CHANGED FROM AN ENTRY POINT TO INCREASE
13 C> PORTABILITY TO OTHER PLATFORMS (JSTIFY WAS
14 C> THEN REMOVED BECAUSE IT WAS JUST A DUMMY
15 C> ROUTINE WITH ENTRIES)
16 C> 2003-11-04 J. ATOR -- ADDED DOCUMENTATION
17 C> 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
18 C> INTERDEPENDENCIES
19 C> 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED HISTORY
20 C> DOCUMENTATION; OUTPUTS MORE COMPLETE
21 C> DIAGNOSTIC INFO WHEN ROUTINE TERMINATES
22 C> ABNORMALLY
23 C> 2007-01-19 J. ATOR -- RESTRUCTURED AND ADDED IRET ARGUMENT
24 C>
25 C> USAGE: CALL JSTCHR (STR, IRET)
26 C> INPUT ARGUMENT LIST:
27 C> STR - CHARACTER*(*): STRING
28 C>
29 C> OUTPUT ARGUMENT LIST:
30 C> STR - CHARACTER*(*): COPY OF INPUT STR WITH LEADING BLANKS
31 C> REMOVED
32 C> IRET - INTEGER: RETURN CODE:
33 C> 0 = normal return
34 C> -1 = input string was empty (i.e. all blanks)
35 C>
36 C> REMARKS:
37 C> THIS ROUTINE CALLS: None
38 C> THIS ROUTINE IS CALLED BY: ELEMDX IGETFXY SNTBBE SNTBDE
39 C> SNTBFE
40 C> Normally not called by any application
41 C> programs but it could be.
42 C>
43  SUBROUTINE jstchr(STR,IRET)
44 
45 
46 
47  CHARACTER*(*) str
48 
49 C-----------------------------------------------------------------------
50 C-----------------------------------------------------------------------
51 
52  IF(str.EQ.' ') THEN
53  iret = -1
54  ELSE
55  iret = 0
56  lstr = len(str)
57  DO WHILE(str(1:1).EQ.' ')
58  str = str(2:lstr)
59  ENDDO
60  ENDIF
61 
62  RETURN
63  END
subroutine jstchr(STR, IRET)
THIS SUBROUTINE LEFT-JUSTIFIES (I.E.
Definition: jstchr.f:43