Table of Contents
fwriteDescriptionWrite an object to a file. Function prototypebool fwrite <voidptr:hFile> <varref:Data> ArgumentsReturn valueTrue if success, false otherwise. Example// // ask user for filename // string FileName set FileName <zs:file.SaveDlg "txt" NULL "Text files (*.txt)|*.txt|All files (*.*)|*.*|"> if <zs:iseq 0 <zs:strlen FileName>> return 0 endif // // Ask user for text to write to file // string s if <zs:not <zs:EditUI s "Enter file text">> return 0 endif // // Open file // voidptr fp assert <zs:fopen_s fp FileName "w"> "Cannot open file!" // // Write text to file using fwrite // fwrite fp s // // Close file // fclose fp CommentsNone. See alsoExcept where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|