ReadLineFrom (open)

Read a line from any input device

Syntax

// Core function, no LOADLIB necessary

STRING FUNCTION ReadLineFrom(INTEGER inputid, INTEGER maxnumbytes, BOOLEAN striplf)

Parameters

INTEGER inputid

Input device id

INTEGER maxnumbytes

(Maximum) number of bytes to read - the function will read until this limit or EOL is reached. This function never reads more than 32768 (32kB) in one call

BOOLEAN striplf

Strip the carriage returns or linefeed characters from the input

Return value

STRING

The data read

Description

This function reads from any input device, eg. a diskfile or a socket. This function reads the specified number of bytes or until the end of line is encountered.