- This wiki is out of date, use the continuation of this wiki instead
Fwrite
From FenixWiki
(Difference between revisions)
| Revision as of 23:36, 12 June 2007 (edit) Woody (Talk | contribs) ← Previous diff |
Current revision (13:04, 17 July 2007) (edit) (undo) Sandman (Talk | contribs) m |
||
| Line 3: | Line 3: | ||
| ==Definition== | ==Definition== | ||
| - | '''INT''' fwrite ( <'''INT''' filehandle> , <''' | + | '''INT''' fwrite ( <'''INT''' filehandle> , <'''VARSPACE''' data> ) |
| Writes data to a file loaded with [[fopen]]. | Writes data to a file loaded with [[fopen]]. | ||
| Line 11: | Line 11: | ||
| | '''INT''' filehandle || - Identifier of the file loaded with [[fopen]]. | | '''INT''' filehandle || - Identifier of the file loaded with [[fopen]]. | ||
| |- | |- | ||
| - | | ''' | + | | '''VARSPACE''' data || - The data to write to the file (any type of variable). |
| |} | |} | ||
Current revision
Contents |
[edit] Definition
INT fwrite ( <INT filehandle> , <VARSPACE data> )
Writes data to a file loaded with fopen.
[edit] Parameters
| INT filehandle | - Identifier of the file loaded with fopen. |
| VARSPACE data | - The data to write to the file (any type of variable). |
[edit] Returns
INT : The number of bytes written to the file.
[edit] Example
Process writething(STRING loadpath);
Private
handle; // handle for the loaded file
druppels; // the data to write to the file
Begin
druppels=rand(1,10);
handle=fopen(loadpath,O_WRITE); // opens the file in writing mode
fwrite(handle,druppels); // writes the druppels variable to the file
fclose(handle); // zipping up after business is done
End
