• Reference Guide


insert(text, par, pos, str)
var_txt <- insert(par, pos, str)
The first variant inserts the string str to the text of the paragraph with the index par at the position pos. The modified text is returned as the result. The text parameter itself remains unchanged. The operation of the latter variant is analogous, but the text stored in the variable var_txt is changed in place. If the paragraph index exceeds the actual number of paragraphs or the position pos exceeds the character number in the paragraph, an error is returned.


A value of the type Rich_text.
An l-value of the type Rich_text.
The index of the paragraph, to which the string is inserted (the type Int). Paragraphs are indexed from 0. If the text contains a table, the paragraphs in the table are numbered by rows.
The index of the character within the paragraph where to insert the string (the type Int). The value 0 denotes the beginning of the paragraph.
The string to be inserted (the type Rich_string).

Return Value

The first variant returns the modified text of the type Rich_text.
The latter variant returns an l-value referring to the variable var_txt.

See Also