FILEWRITEBYTE
Syntax
FUNCTION FILEWRITEBYTE( character,
reserved
)
Description
FILEWRITEBYTE is built into version
8.30 and later.
Writes a character into the open file.
Returns 1 on success or error codes listed in FILEOPEN
Example
dim
buffer(32) as string
printf("SD Card Example
Program")
i =
fileopen("logfile2.txt", "w")
if
i=1
buffer = "abcdefghijklmnoa" +
chr(13)+chr(10)
for j=0 to len(buffer)-1
i =
filewritebyte(buffer(j),0)
if i <
0
printf("filewritebyte() failed %d",
i)
goto
WRITE_FAILED
endif
next
j
WRITE_FAILED:
fileclose(0)
printf("Write
%d bytes",j)
endif
\
Differences from other BASICs
\
- no equivalent Visual BASIC
- no equivalent in PBASIC
See also
\