On this Page

    fp.fputs

    Write a string to a previously opened file.

    Syntax

    fp.fputs(string)

    Parameters

    string is a string of characters to be written to the output stream. fp a file object previously created by _file.fopen.

    Returned Value

    None

    Description

    A previous call to _file.fopen must have been made. It returns a new file object fp. That object must then be used to call fputs.

    Example

     var fp = _file.fopen("myfile.txt", "w");	// open for write
     fp.fputs("Hello World");	// write to file
     fp.fclose();