1 INTEGER FUNCTION ISIZE
(NUM
)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
6 C PRGMMR: ATOR ORG: NP12 DATE: 2009-03-23
8 C ABSTRACT: THIS FUNCTION COMPUTES AND RETURNS THE NUMBER OF CHARACTERS
9 C NEEDED TO ENCODE THE INPUT INTEGER NUM AS A STRING. IT DOES NOT
10 C ACTUALLY ENCODE THE STRING BUT RATHER ONLY FIGURES OUT THE REQUIRED
11 C SIZE. NUM MUST BE AN INTEGER IN THE RANGE OF 0 TO 99999.
13 C PROGRAM HISTORY LOG:
14 C 2009-03-23 J. ATOR -- ORIGINAL AUTHOR
16 C USAGE: CALL ISIZE ( NUM )
17 C INPUT ARGUMENT LIST:
18 C NUM - INTEGER: NUMBER TO BE ENCODED
20 C OUTPUT ARGUMENT LIST:
21 C ISIZE - INTEGER: NUMBER OF CHARACTERS NECESSARY TO ENCODE NUM
25 C THIS ROUTINE CALLS: BORT
26 C THIS ROUTINE IS CALLED BY: READMT UFBDMP UFDUMP
27 C Normally not called by any application
28 C programs but it could be.
31 C LANGUAGE: FORTRAN 77
32 C MACHINE: PORTABLE TO ALL PLATFORMS
36 CHARACTER*128 BORT_STR
38 C-----------------------------------------------------------------------
39 C-----------------------------------------------------------------------
41 IF ( NUM
.LT
. 0 ) GOTO 900
43 IF ( NUM
.LT
. 10**ISIZE
) RETURN
48 900 WRITE(BORT_STR
,'("BUFRLIB: ISIZE - INPUT NUMBER (",I7,'//
49 . '") IS OUT OF RANGE")') NUM