#fclose()
DESCRIPTION
close an open file, returning TRUE if successful, and ERR if unsuccessful
SYNOPSIS
#fclose(F)
ARGUMENTS
F - a filehandle (all caps)
EXAMPLES
outputfile(C, F) // send all output from file (F) to communications
// channel (C)
// (C) is the comm channel (e.g., mail, syslog, print)
// (F) is the file (e.g., "=crontabs/$name")
// sample use: =outputfile(mail, "=crontabs/$name")
if #fopen(OUTPUTFILE, (F), "r")
while #read(OUTPUTFILE) > 0
output (C) $rdlin
endwhile
do #fclose(OUTPUTFILE)
fi
begin
// record all accounts in passwd file in #passwd[] array
if #fopen(PASSWD, "/etc/passwd", "r") != #err()
while #read(PASSWD) > 0
do #split($p, $rdlin, ":")
if $p[1] eq "+"
cont
fi
=incr(#passwd[=strip($p[1],"+")])
endwhile
do #fclose(PASSWD)
else
output mail "can't open /etc/passwd for reading!"
quit
endif
SEE ALSO
#fopen()
#popen()
#pclose()
#read()
#write()
Numerical Functions
String Functions