Texas Instruments TI89 Developer Guide - Page 620
FWrite, Declaration, Categoryies, Description, Inputs, FOpen, Outputs, Assumptions, Side Effects
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 620 highlights
578 Appendix A: System Routines - Files FWrite Declaration: Category(ies): Description: Inputs: Outputs: WORD FWrite (void * buffer, FSWORD bytesToWrite, FILES * fsPtr) Files Write to a file returning FS_OK if successful. FS_ERROR if the file is not in WRITE mode or FS_MEMORY if the system has run out of memory. buffer - Buffer to write to file. bytesToWrite - Number of bytes to write. fsPtr - Pointer to FILES structure previously opened with FOpen. FS_OK - If successful. FS_ERROR - File is not in write mode. FS_MEMORY - Out of memory. NOTE: Any error will cause the file status to be set to FS_ERROR so that multiple writes may be performed without checking the return status as long as an FStatus is done at the end to make sure all of the writes were successful. Assumptions: File is opened in WRITE mode. Side Effects: May cause heap compression. Availability: On AMS 2.00 and higher. TI-89 / TI-92 Plus Differences: None See Also: None Example: FILE f1; if (FS_OK == FOpen("APPDATA", &f1, FM_WRITE, "EXT" )) { FWrite( "123456", 6, &f1 ); FWrite( "abc", 3, &f1 ); /* can check each FWrite or check FStatus when done with all writes */ if (FS_OK != FStatus( &f1 )) { FClose( &f1 ); Disp("ERROR writing to file"); FDelete( "APPDATA" ); /* only have partial file */ return; } FClose( &f1 ); /* all writes were successful */ } TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/620.png)