NCEPLIBS-bufr 11.7.1
jstnum.f File Reference

Left-justify a character string containing an encoded integer. More...

Go to the source code of this file.

Functions/Subroutines

subroutine jstnum (STR, SIGN, IRET)
 This subroutine left-justifies a character string containing an encoded integer, by removing all leading blanks and any leading sign ('+' or '-') character. More...
 

Detailed Description

Left-justify a character string containing an encoded integer.

Definition in file jstnum.f.

Function/Subroutine Documentation

◆ jstnum()

subroutine jstnum ( character*(*)  STR,
character*1  SIGN,
  IRET 
)

This subroutine left-justifies a character string containing an encoded integer, by removing all leading blanks and any leading sign ('+' or '-') character.

The string is modified in place, and the sign is returned as a separate parameter. If the input string contains only blank characters, then a call is made to subroutine bort().

Author
J. Woollen
Date
1994-01-06
Parameters
[in,out]STR– character*(*): String
[out]SIGN– character*1: Sign of encoded integer value
  • '+' = positive value
  • '-' = negative value
[out]IRET– integer: return code
  • 0 = normal return
  • -1 = input string contained non-blank characters which were also non-numeric

Program History Log:

Date Programmer Comments
1994-01-06 J. Woollen Original author
1998-07-08 J. Woollen Replaced call to Cray library routine ABORT with call to new internal routine bort()
2002-05-14 J. Woollen Changed from an entry point to increase portability to other platforms
2003-11-04 J. Ator Added documentation
2009-04-21 J. Ator Use errwrt()
2021-09-30 J. Ator Use Fortran intrinsic adjustl

Definition at line 33 of file jstnum.f.

References bort(), errwrt(), and strnum().

Referenced by elemdx().