write-char (AutoLISP)

Writes one character to the screen or an open file

Supported Platforms: Windows and Mac OS

Signature

(write-char num [file-desc])
num

Type: Integer

The integer value in the range of 1-65536 representing the character to be written.

file-desc

Type: File

A file descriptor for an open file.

Return Values

Type: Integer

The num argument.

Release Information

History

Examples

The following command writes the letter C to the command window, and returns the supplied num argument:

(write-char 67)
C67

Assuming that f is the descriptor for an open file, the following command writes the letter C to that file:

(write-char 67 f)
67
Note: write-char cannot write a NULL character (code 0) to a file.