| write |
(Stream stream, String str [, int n]) |
yoix.io |
| |
Tries to write the entire string
str,
or just the first
n
characters if
n
is given, to
stream
and returns the number of characters actually written or
-1
if an error occurs.
| |
| Example: |
On a UNIX-like system the program,
import yoix.io.*;
import yoix.stdio.*;
String buf[1024];
File file;
int count;
if ((file = open("/etc/passwd", "r")) != NULL) {
while ((count = read(file, buf, buf@sizeof)) >= 0)
write(stdout, buf, count);
fclose(file);
}
copies the system password file to standard output.
| | |
| Return: |
int
| | |
| See Also: |
writeChar,
writeLine
|
|
Yoix is a registered trademark of AT&T Intellectual Property.
|