%N atoif %F $MIR/src/subs/string.for
%D Decode a string as an integer.
%P rjs
%: strings
%B
      subroutine atoif(string,result,ok)

      character string*(*)
      integer result
      logical ok
  ---------------------------------------------------------------------
  Decode string as an integer.  The string can be input as a hex, octal
  or decimal number using a prefix 0x, %x or h for hex, o or %o for
  octal, and +, - or nothing for decimal.

  Input:
    string     The ascii string, containing the integer.
  Output:
    result     The integer value.
    ok         This will be true if the decoding succeeded.
