FPUT (The GNU Fortran Compiler)

### 8.118 `FPUT` — Write a single character in stream mode to stdout ¶

Synopsis:

  `CALL FPUT(C [, STATUS])`
  `STATUS = FPUT(C)`

Description:

  Write a single character in stream mode to stdout by bypassing normal formatted output. Stream I/O should not be mixed with normal record-oriented (formatted or unformatted) I/O on the same unit; the results are unpredictable.

  This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit.

  Note that the `FGET` intrinsic is provided for backwards compatibility with `g77`. GNU Fortran provides the Fortran 2003 Stream facility. Programmers should consider the use of new stream IO feature in new code for future portability. See also Fortran 2003 status.

Class:

  Subroutine, function

Arguments:

  C | The type shall be `CHARACTER` and of default kind.
  STATUS | (Optional) status flag of type `INTEGER`. Returns 0 on success, -1 on end-of-file and a system specific positive error code otherwise.

Example:

      PROGRAM test_fput
        CHARACTER(len=10) :: str = "gfortran"
        INTEGER :: i
        DO i = 1, len_trim(str)
          CALL fput(str(i:i))
        END DO
      END PROGRAM

Standard:

  GNU extension

See also:

  `FPUTC` — Write a single character in stream mode,
  `FGET` — Read a single character in stream mode from stdin,
  `FGETC` — Read a single character in stream mode