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.
The DevRead function does not support SQL devices. Use the DevGetField function for these devices.
Syntax
DevRead(hDev, Length)
hDev:
The device handle, returned from the DevOpen() function. The device handle identifies the table where all data on the associated device is stored.
Length:
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
Example
! Read 20 characters from a device.
Str=DevRead(hDev,20);
See Also
Published June 2018