Cicode Programming Reference > Cicode Function Categories > Device Functions Introduction > DevRead


Reads characters from a device. If the device is record-based, the current field is read. If the device is free-format, the specified number of characters is read. If the number of characters specified is greater than the number of characters remaining in the device, only the remaining characters are read.


DevRead(hDev, Length)


The device handle, returned from the DevOpen() function. The device handle identifies the table where all data on the associated device is stored.


The number of characters to read.

Return Value

The data (in string format). If the end of the device is found, an empty string is returned.

Related Functions

DevOpen, DevReadLn, DevFind


! Read 20 characters from a device.

See Also

Device Functions