readln

BAP Online Manuals : Library Reference : Library by Name : readln
Previous: readdevice
Next: rec_msg

6.2.104. readln

reads a string from the current input stream until eol

SYNOPSIS

INCLUDE 'iolib.h'
readln(InputString)

SYNTAX

readln(String) (o)

ARGUMENTS

string(String) (o) string that was read

DESCRIPTION

Reads a string from the input stream and matches it with Term. The term must be followed by a newline or end of line character which is removed from the current input stream. Fails in case of end of file or if the user presses the escape <ESC> key while using keyboard input.

EXAMPLE

file_str("test","Hello World"),
readdevice(Old),
openread(f,"test"),
readdevice(f),
readln(X),
readdevice(Old),
closefile(f),
write(X),nl.

ERRORS

No runtime errors.

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

get , read , readchar , readdevice


BAP Online Manuals : Library Reference : Library by Name : readln
Previous: readdevice
Next: rec_msg