getc
getc( [p_inputPort] ) =>s_char
Description
Reads and returns a single character from an input port. Unlike the C library, the getc and getchar SKILL functions are totally unrelated.
The input port arguments for both gets and getc are optional. If the port is not given, the functions take their input from piport.
Arguments
Value Returned
|
Single character from the input port in symbol form. If the character returned is a non-printable character, its octal value is stored as a symbol. |
Examples
In the following assume the file test1.data has its first line read as:
#This is the data for test1
p = infile("test1.data")
=> port:"test1.data"
getc(p)
=> \#
getc(p)
=> T
getc(p)
=> h
Related Topics
Return to top