# (read-char \[file-descriptor\])
[GstarCAD 2012](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md)
<a id="250"></a>
## (read-char \[file-descriptor\])
---
Read a single character.
---
This function reads a single character from the file or keyboard. When a *file-descriptor* is included (as assigned by the [open](%28open%20filename%20mode%29.md) function), **read-char** reads from a file. When *file-descriptor* is missing, **read-char** reads from the keyboard. \]
The **read-char** function doesn't actually return the letter, rather it returns the ASCII code of that letter. To actually see the letter, you must convert the ASCII code using the [chr](%28chr%20integer%29.md) function.
### Examples
For the following example, assume the file *sample.lsp* exists, and the first line is "C:\\Sample\\First.txt".
| Code | Returns |
| --- | --- |
| (setq file (open "sample.lsp" "r")) | |
| (setq c (**read-char** file)) | 67 |
| (setq a (chr c)) | "C" |
| | |
| (**read-char**) \[press A\] | Waits for you to press a key. 65 |
**Tell me about...**
[(read-line \[file-descriptor\])](%28read-line%20-file-descriptor-%29.md)
[(setq symbol1 statement1 \[symbol2 statement2\] ...)](%28setq%20symbol1%20statement1%20-symbol2%20statement2-%20...%29.md)
[(write-char character \[file-descriptor\])](%28write-char%20character%20-file-descriptor-%29.md)
[LISP Compatibility](../LISP%20Compatibility.md)
[Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md)
<a id="holding"></a>
## Other versions with matching text
[GstarCAD 2011](../../../../2011/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28read-char%20-file-descriptor-%29.md)