%N txtwrite %F $MIR/src/subs/txtio.for
%D Write a line to a text file
%P rjs
%: text-files, text-i/o
%B
        subroutine txtwrite(lu,string,length,iostat)

        implicit none
        integer lu,iostat,length
        character string*(*)

  TxtWrite writes a line to a text file. Any trailing spaces in input
  string are not written.

  Input:
    lu         The handle of the text file.
    string     The string to be written.
    length     The number of characters to be written.
  Output:
    iostat     I/O completion code. Zero indicates success.
