basic.%write C Function/BASIC Program

basic.%write

Command basic.%write C Function/BASIC Program
Applicable release versions: AP/Unix
Category BASIC Program (486)
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.
Syntax n=%write(file.descriptor, variable, size)
Options
Example
n=len(item)
if %write(fd,item,n)<n then crt "write error"
Purpose
Related basic.%whex
basic.%creat
basic.%dup
basic.cfunc
basic.cfunction
basic.%ttyname
basic.%open
basic.%lseek