Difference between revisions of "FCLOSE()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Function to close an open text file | Function to close an open text file | ||
Line 12: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[FCREATE()]], [[FERROR()]], [[FGETS()]], [[FOPEN()]], [[FPUTS()]], [[FREADSTR()]], [[FWRITE()]], [[MEMOEDIT()]], [[MEMOREAD()]], [[MEMOWRITE()]], [[TEXTEDIT()]] | + | [[FCREATE()]], [[FEOF()]], [[FERROR()]], [[FFLUSH()]], [[FGETS()]], [[FOPEN()]], [[FPUTS()]], [[FREAD()]], [[FREADSTR()]], [[FSEEK()]], [[FWRITE()]], [[MEMOEDIT()]], [[MEMOREAD()]], [[MEMOWRITE()]], [[TEXTEDIT()]] |
Line 40: | Line 36: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:ASCII File Access]] | ||
+ | [[Category:ASCII File Access Functions]] |
Latest revision as of 17:13, 27 November 2009
Purpose
Function to close an open text file
Syntax
FCLOSE(<expN>)
See Also
FCREATE(), FEOF(), FERROR(), FFLUSH(), FGETS(), FOPEN(), FPUTS(), FREAD(), FREADSTR(), FSEEK(), FWRITE(), MEMOEDIT(), MEMOREAD(), MEMOWRITE(), TEXTEDIT()
Description
The FCLOSE() function will close an open text file, writing the associated buffers to disk. The <expN> is the file pointer obtained from FCREATE() or FOPEN(). The file pointer must be assigned when the file is first opened using the FOPEN() or FCREATE() functions. If an error occurs during the operation -1 is returned by the FERROR() function.
Example
use accounts scatter to flist m_total=alen(flist) fp=fcreate("new.txt") if ferror()=-1 dialog box "The file could not be created." else for n=1 to m_total fwrite(m->fp,flist[n],80) next endif fclose(fp) if ferror()=-1 dialog box "The file could not be closed." endif
Products
Recital Server, Recital