C Library Functions  - system_getchar (3)

NAME

system_getchar(3f) - [M_system:IO] reads a character from the stdin stream. (LICENSE:PD)

CONTENTS

Synopsis
Description
Return Value
Return Value
Examples

SYNOPSIS

integer(kind=c_int) function system_getchar(ch)

     character(len=1),intent(in) :: ch

DESCRIPTION

system_getchar(3f) read the character CH from the stdin stream via C I/O

RETURN VALUE

getchar(3C) returns the character written as an unsigned char cast to an int or EOF(a negative value) on error. This is passed on to system_getchar(3f).

RETURN VALUE

the status code. If negative an error occurred

EXAMPLES

Example program

     program demo_system_getchar
     use M_system,      only : system_getchar, system_putchar
     implicit none
     integer :: i
     integer :: iostat
     character(len=1) :: ch
     do while(system_getchar(ch).ge.0)
        iostat= system_putchar(’[’)
        iostat= system_putchar(ch)
        iostat= system_putchar(’]’)
     enddo
     end program demo_system_getchar


Nemo Release 3.1 system_getchar (3) February 23, 2025
Generated by manServer 1.08 from 06c7193e-e1c4-4106-850c-31a16b32a7a3 using man macros.