      logical function is_digit(d)
C
C Description:
C
C This function returns TRUE if the character 'd' is a numerical digit.
C It returns FALSE otherwise.
C
C User interface:
C
C Name      in/out type          Structure  Meaning
C is_digit  out    logical       scalar     TRUE if d is a digit. 
C                                           FALSE otherwise
C d         in     character(1)  scalar     The character to be examined
C
C Errors:
C
C No errors should occur and none are trapped.
C
C Bugs:
C
C This routine assumes the ASCII character set.
C
      implicit none
      character*1 d
      is_digit=((d .ge. '0') .and. (d .le. '9'))
      return
      end
