write_n_chars
write_n_chars — writes characters from a buffer to a file.
write_n_chars (file, buffer, nchars)
fileA file pointer to the open destination file for the characters.
bufferThe buffer that is the source of the characters.
ncharsThe number of characters to write.
The number of characters successfully written to the file.
This function reads a given number of characters from a buffer and writes them to an open file.
The following example writes the characters 'e', 'f', and 'g' to a file.
Gamma>fw = open("mywritencharsfile.dat", "w");#<File:"mywritencharsfile.dat">Gamma>buf = buffer (101, 102, 103, 104);#{efgh}Gamma>write_n_chars (fw, buf, 3);3Gamma>