![Fujitsu F2MC-16L Series Скачать руководство пользователя страница 41](http://html.mh-extra.com/html/fujitsu/f2mc-16l-series/f2mc-16l-series_user-manual_118382041.webp)
29
4.2 Standard I/O Function Interface Getchar
4.2
Standard I/O Function Interface Getchar
Inputs one character from the standard I/O device.
■
Getchar
[
Interface
]
Format
int chrcd = getchar();
Parameter
None
Return parameter chrcd
:Input code
EOF
:Error
[
Description
]
Inputs one character from the standard I/O device. The function returns the input character if
input completes normally. If an error occurs, the function returns EOF (-1).
Whether or not getchar echoes input characters and whether or not it waits for key input are
determined by the operation of the input driver.
[
Examples
]
❍
Assembler interface
#include scdef.inc
.import_getchar
callp _getchar
cbne a,#h'1a,endcode
: :
❍
C interface
#include "scdef.h"
prog()
{
int c ;
c = getchar() ;
: :
}
*
Содержание F2MC-16L Series
Страница 2: ... ...
Страница 4: ... ...
Страница 10: ...vi ...
Страница 12: ...viii ...
Страница 44: ...32 CHAPTER 4 Program Reference for the Standard I O Library ...
Страница 53: ...41 APPENDIX B Running the Sample System Figure Be Project Member List ...
Страница 54: ...42 APPENDIX Figure Bf Set Configuration File Dialog Box ...
Страница 64: ...52 APPENDIX Figure Cb Sample System Memory Map Continued ...
Страница 65: ...53 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 68: ... ...