Next Previous Up Top Contents Index

WebMaker User Guide

12.12.1 General I/O functions

closefile(LUV)

Parameters

LUV is a logical unit variable.

Closes the already open file identified by LUV.

For example, to close the file which, when opened by openfile(), had been associated to @tocfile:

closefile(@tocfile) --> "" 

openfile(LUV, filename, mode)

Parameters

LUV

A logical unit variable.

filename

A string.

mode

new or append.

Opens the file filename with mode for writing. Subsequent output to this file must be specified through LUV.

For example:

openfile(@tocfile,"/home/username/xyzTOC.html",append) --> ""

write(filestream, string1, string2, ..., stringn)

Parameters

filestream

A file stream variable identifier. filestream may be:

*, to write into the current HTML file.
stdout, to write to standard output.
LUV, to write into the file associated with the logical unit variable, LUV, that is set by openfile() when the file is initially opened.
string1...

An unlimited sequence of character strings.

Writes the concatenated sequence of strings followed by a carriage return into the file specified by filestream.

For example:

openfile(@list-of-figures,"/home/rousseau/figTOC.doc",append);
write(@list-of-figures,text());