putchar(3f) - [M_io:QUERY] write a single-byte character to stdout via C interface (LICENSE:PD)
Synopsis
Description
Options
Returns
Examples
Author
License
function putchar() result(ch)
character(len=1),intent(in) :: ch integer :: putchar
Write a single character to stdout using the C interface
ch A single character to place on stdout
A integer value for the ADE (ASCII Decimal Equivalent) of the character, or a negative value if an error occurs.
sample usage
program demo_putchar use M_io, only : getchar, putchar implicit none character(len=1) :: byte integer :: istat ! copy stdin to stdout as a stream one byte at a time do while (getchar(byte).ge.0) istat=putchar(byte) enddo end program demo_putchar
John S. Urban
Public Domain
Nemo Release 3.1 | putchar (3) | February 23, 2025 |