standard.C.io.fputs

fputs is available since version 1.0.

Prototype:

number fputs(string buffer, number fd)

Parameters

buffer
[in] Output string
fd
[in] A valid file descriptor

Description:

fputs copies buffer to the output stream fd at the current position, without the terminating null character.

Return value:

fputs returns a negative value if it is successful.

Example
import standard.C.io

define FILENAME     "test.txt"

class Main {
     function Main() {
          var fd; 
          var buffer = "Testing fputs.";     

          // Open file for write
          if (fd = fopen(FILENAME, "w")) {               
               if (fputs(buffer, fd))
                    echo "fputs error\n";                    
               else
                    echo "fputs success\n";
               fclose(fd);
          } else
               echo "Problem opening the file\n";
          
     }
}  

Results 
fputs success