Topic complex |
Ramtext functions |
Function |
ramtext_insert() |
Short |
Inserts a string to a ramtext |
Syntax |
ramtext_insert(ramtext : STRING; startpos : INTEGER; target : STRING) : INTEGER |
Parameter |
ramtext : name of ramtext in the form "ramtext:..."
startpos: position of the character, where the string should be inserted
target : the string that is to insert |
Return |
number of the characters that are displaced by the insertion
|
See also: |
|
Description |
This function inserts a string at the position startpos.
The return value is rather of academic interest, because it is the number of replaced characters (filesize-startpos).
0 is returned, if the string could not inserted because
* startpos had the value 0
* startpos was bigger than the actual filesize+1
* the insertion lead to a filesize greater than 64 KB at present.
According to that startpos can get the values between 1 (insertion at the beginning) and getsize(ramtext)+1 (insertion at the end).
|