basic.%write
Writes to a Unix file.
Syntax
n=%write(file.descriptor, variable, size)
Description
writes the number of bytes desinated by 'size' from 'variable' to the file specified by 'file.descriptor' returned by a previous call to '%open()', '%creat()' or 'dup()'.
This function returns the number of bytes actually written. If the length of variable is less than size, the content of the string written is undefined, as is usual in C. No data translation occurs.
Example
n=len(item)
if %write(fd,item,n)<n then crt 'write error'
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
