fileWrite
Syntax | fileWrite(fid, string_byte_or_bytearray) | Package | file |
Alias | Pkg Usage | open(fid, string_byte_or_bytearray) |
Description
Writes text or byte data to an open file.
Parameters
Parameter name | Type | Required | Description |
|---|---|---|---|
fid | String | Yes | The id of the open file to write to. |
string_byte_or_bytearray | String/Byten | Yes | The text string or byte data to write to the file. |
Return Type
None
Return value has no meaning.
Error Handling
Throws String
Error: "write_error": followed by the actual error
Example
Example 1
use "file";
int fid = open(filename); //fileOpen
fileWrite(fid, "First line is here
"); //full name of the routine
write(fid, "Second line is here
");
close(fid); //fileClose