write-char

AutoCad AutoLISP Functions

 
write-char
 
 
 

Writes one character to the screen or to an open file

(write-char num [file-desc]) 

Arguments

num

The decimal ASCII code for the character to be written.

file-desc

A file descriptor for an open file.

Return Values

The num argument.

Examples

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

Command: (write-char 67)

C67

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

Command: (write-char 67 f)

67

Note that write-char cannot write a NULL character (ASCII code 0) to a file.