NCEPLIBS-bufr  12.0.0
strnum.F90 File Reference

Decode an integer from a character string. More...

Go to the source code of this file.

Functions/Subroutines

recursive subroutine strnum (str, num, iret)
 Decode an integer from a character string. More...
 

Detailed Description

Decode an integer from a character string.

Author
J. Woollen
Date
1994-01-06

Definition in file strnum.F90.

Function/Subroutine Documentation

◆ strnum()

recursive subroutine strnum ( character*(*), intent(in)  str,
integer, intent(out)  num,
integer, intent(out)  iret 
)

Decode an integer from a character string.

This subroutine decodes an integer from a character string. The string may contain leading or trailing blanks, but otherwise should contain only digits and an (optional) leading sign ('+' or '-') character.

If the string is empty or contains all blank characters, then num is returned with a value of 0.

Parameters
[in]str- character*(*): String.
[out]num- integer: Value decoded from str.
[out]iret- return code: 0 = success -1 = string contained one or more illegal characters
Author
J. Woollen
Date
1994-01-06

Definition at line 23 of file strnum.F90.

References modv_im8b::im8b, strsuc(), and x48().

Referenced by fdebufr_c(), gettbh(), jstnum(), nemtbb(), parutg(), seqsdx(), sntbfe(), bufr_c2f_interface::strnum_c(), and upftbv().