%N gettok %F $MIR/src/subs/string.for
%D Extract a token from a string.
%P rjs
%: strings
%B
      subroutine gettok(string,k1,k2,token,length)

      integer k1,k2,length
      character string*(*),token*(*)
  ---------------------------------------------------------------------
  Extract an alphanumeric token from the string. White space at the
  start of the string is first skipped.

  Input:
    string     The string containing the tokens.
  Input/Output:
    k1,k2      These delimit the characters in the string that are
               to be processed. On output, k1 is incremented to point
               beyond the token just returned.
  Output:
    token      The returned token.
    length     The length of the token.
