file_str

BAP Online Manuals : Library Reference : Library by Name : file_str
Previous: fail
Next: filedate

6.2.50. file_str

converts a file into a string and vice versa

SYNOPSIS

INCLUDE 'iolib.h'
file_str(FileName,String)

SYNTAX

 file_str(FileName,String) (i,i) (i,o)

ARGUMENTS

string(FileName) (i) FileName of file to be read or written
string(String) (i) String that is to be write to the file
string(String) (o) Content of the file

DESCRIPTION

Either writes the String to the file specified, or reads the file and stores the contents into String.

EXAMPLE

file_str("help.txt",Text),
write(Text).

ERRORS

No runtime errors. Fails if file cannot be written or read.

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

openread , openwrite , see , tell


BAP Online Manuals : Library Reference : Library by Name : file_str
Previous: fail
Next: filedate