read-char
 
 
 

Returns the decimal ASCII code representing the character read from the keyboard input buffer or from an open file

(read-char [file-desc]) 

Arguments

file-desc

A file descriptor (obtained from open) referring to an open file. If no file-desc is specified, read-char obtains input from the keyboard input buffer.

Return Values

An integer representing the ASCII code for a character. The read-char function returns a single newline character (ASCII code 10) whenever it detects an end-of-line character or character sequence.

Examples

The following example omits file-desc, so read-char looks for data in the keyboard buffer:

Command: (read-char)

The keyboard buffer is empty, so read-char waits for user input:

ABC
65

The user entered ABC; read-char returned the ASCII code representing the first character entered (A). The next three calls to read-char return the data remaining in the keyboard input buffer. This data translates to 66 (the ASCII code for the letter B), 67 (C), and 10 (newline), respectively:

Command: (read-char)

66

Command: (read-char)

67

Command: (read-char)

10

With the keyboard input buffer now empty, read-char waits for user input the next time it is called:

Command: (read-char)


500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@entercad.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.