GETC real-valued function GETC real-valued function Syntax GETC (lun, mode) Function Return the next character (byte) from a device or input record on the specified logical unit. Usage Considerations The logical unit must be attached by the program for normal, variable-length record input/output. Parameters lun Real value, variable, or expression (interpreted as an integer) that identifies the device to be accessed. (See the ATTACH instruction for a description of the unit numbers.) mode Real value, variable, or expression (interpreted as an integer) that specifies the mode of the read operation. Currently, the mode is used only for the terminal and serial I/O logical units.
The value is interpreted as a sequence of bit flags as detailed below. (All bits are assumed to be clear if no mode value is specified.) Bit 1 (LSB) Disable waiting for input (mask value = 1) If this bit is clear, program execution is suspended until the next byte is received. If the bit is set and no bytes are available, the function immediately returns the error code for *No data received* (-526). NOTE: A -526 error may be returned by the first no-wait GETC even if there are bytes queued. Bit 2 Disable echo (mask value = 2) If this bit is clear, input from the terminal is echoed back to the source. If the bit is set, characters are not echoed back to the source.
(This bit is ignored for the serial lines.) Details The next byte from the device is returned. When reading from a record-oriented device such as the system terminal or a disk file, the carriage-return and line-feed characters at the end eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 266