read-char

(read-char [file_descriptor])

The read-char function reads a single character from the keyboard buffer or from an open file optionally specified by file_descriptor.

Return Value

The function returns the ASCII code as an integer.

Examples

: (read-char)

: (setq fd (open "test.txt" "r"))

: (read-char fd)