openwrite
BAP Online Manuals : Library
Reference : Library by Name
: openwrite
Previous: openread
Next: parse
BAP Online Manuals : Library Reference : Library by Name : openwrite
Previous: openread
Next: parse
Previous: openread
Next: parse
6.2.94. openwrite
opens a file for writing
SYNOPSIS
INCLUDE 'iolib.h' openwrite(file,"filename")
SYNTAX
openwrite(Handle,FileName) (i,i) (o,i)
ARGUMENTS
handle(Handle) (i) virtual file handled which will be associated with the
file
void(Handle) (o) real file handle returned by the host
string(FileName) (i) name of the file to be opened
DESCRIPTION
The file with the name FileName is opened writing only. An already existing it will be deleted first. It is referred to by the Handle, which may either be virtual or real.
EXAMPLE
openwrite(f,"test"), writedevice(f), write("Hello World"), writedevice(screen), closefile(f), file_str("test",Y), write(Y),nl.
ERRORS
No runtime errors. Fails if file could not be opened.
LAYERS
prolog-process, client-server, object
RELATED PREDICATES
closefile , openread , openmodify , readdevice , writedevice , read , write
BAP Online Manuals : Library Reference : Library by Name : openwrite
Previous: openread
Next: parse