| Concept Framework 2.2 documentation | Contents | Index |
| Name | Version | Deprecated |
| fputs | version 1.0 | no |
| number fputs(string buffer, number fd) |
| buffer | [in] Output string |
| fd | [in] A valid file descriptor |
|
fputs copies buffer to the output stream fd at the current position, without the terminating null character.
|
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
|
| Documented by Simona Plesuvu, generation time: Sun Jan 27 18:15:16 2013 GMT | (c)2013 Devronium Applications |