After a memory file is initialized, all rows in the file are empty. The file viewing functions will stop displaying rows at the first empty file row. Empty rows will not be displayed as blank rows.
If you want a blank row displayed in the middle of a memory file, you must place a string containing only a null terminator or a newline character, '\n', in the desired row.
mf_rowrpl() recognizes and handles newline characters ('\n') embedded in strings. The routine handles a string with embedded new line characters as separate strings and makes a call to mf_rowrpl() for each string. Thus, calling the following:
|
is the equivalent to calling:
|
You will generally want to embed newlines only in strings appended to the bottom of a memory file, for example, in strings used to build a memory file initially. If newlines are in a string used to replace a row, file text will be replaced not only in the specified row but in following rows as well.
If all line segments of a string will not fit in a file, those that will fit will be transferred before the error return is made. The global error code VV_ERR will be set to FILETOOBIG.