Table of Contents
fopenDescriptionOpen a file for reading or writing. Function prototypevoidptr fopen <string:FileName> <string:Mode> Arguments
Return valueNULL if an error occurred, or a non-NULL handle to an opaque file object. Examplevoidptr fp // create a file handle set fp <zs:fopen "C:\\test.txt" "w"> // open the file, and assign the value to 'fp' assert fp "Cannot open file!" // exit if file can't be opened string s set string "Hello!" fwrite fp s // write text to file fclose fp // close file … the output of which is written to the 'C:\test.txt' file: Hello! CommentsNone. See alsoExcept where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|