Fwrite

From Scriptwiki
Revision as of 23:52, 18 December 2005 by Doomie (talk | contribs) (changed some links due to stupidity)

Jump to: navigation, search

Writes text or the specified binary variable to the file.

/fwrite [-bn] <name> <text | &binvar>


Explanation of the switches:

Switch Meaning
b indicates that a &binvar is being specified
n appends a $crlf to the line being written.


Note that it will append the text to the file. To overwrite / insert, you have to look at /fseek before.

Note that the file has to be opened (/fopen) before.

Example

/fwrite moo moo!

This will just add moo! to the end of the file assigned to the name moo.


/fwrite -n moo moo!

This will add moo! and a $crlf to the end of the file assigned to the name moo.


/fwrite -b moo &moo

This will add the content of the Binary Variable &moo to the end of the file assigned to the name moo.