read_charT_read_charReadCharReadCharread_char (算子)
名称
read_charT_read_charReadCharReadCharread_char — 从窗口读取字符。
签名
描述
read_charread_charReadCharReadCharReadCharread_char reads a character from the keyboard in the
input window (= output window). If the character is printable it is returned
in CharCharCharCharcharValchar. If a control key has been pressed, this will be indicated
by the value of CodeCodeCodeCodecodecode. Some important keys are recognizable by
this value. Possible values are:
- 'character':
printable character
- 'left':
cursor left
- 'right':
cursor right
- 'up':
cursor up
- 'down':
cursor down
- 'insert':
insert
- 'none':
none of these keys
- 'canceled':
read_charread_charReadCharReadCharReadCharread_char has been canceled (Windows only)
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
WindowHandleWindowHandleWindowHandleWindowHandlewindowHandlewindow_handle (输入控制) window → HWindow, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
窗口句柄。
CharCharCharCharcharValchar (输出控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Input character (if it is not a control character).
CodeCodeCodeCodecodecode (输出控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Code for input character.
结果
read_charread_charReadCharReadCharReadCharread_char returns 2 (
H_MSG_TRUE)
if the window is valid.否则将抛出异常。
可能的前趋
open_windowopen_windowOpenWindowOpenWindowOpenWindowopen_window,
set_fontset_fontSetFontSetFontSetFontset_font
替代
read_stringread_stringReadStringReadStringReadStringread_string,
fread_charfread_charFreadCharFreadCharFreadCharfread_char,
fread_stringfread_stringFreadStringFreadStringFreadStringfread_string
另见
write_stringwrite_stringWriteStringWriteStringWriteStringwrite_string,
set_fontset_fontSetFontSetFontSetFontset_font
模块
基础