Arbortext Command Language > Functions by Alphabetical Listing > insert
  
insert
insert(string[, dest])
 
This function inserts the string value of the expression string into the destination specified by dest, which is either a document identifier or a window name. If omitted, the current document is used. It can be one of the window types returned by the window function (for example, edit, cmd, helpwin1).
* 
Even if you have applied an alias map to the document, string cannot include aliases.
string is interpreted as an SGML-coded string unless the destination window contains an ASCII document-type. Tabs and 8–bit characters are not stripped from text inserted into help windows using this function.
An example of this function is:
insert("find", window_doc(" cmd"))
This function is similar to the insert_string -sgml command except that the string argument may be an expression, it is not limited in size, and does not replace any text that might be selected.
This function interprets the processing instruction <?Pub Caret> to set the cursor to a specific position within the inserted fragment. The <?Pub Caret> must come after a character or tag in the SGML- or XML-coded string. If the <?Pub Caret> processing instruction is not included in the string, the cursor is placed according to the following rules:
If the cursor is in the Edit view, the cursor is placed after the inserted string.
If the cursor is in the Document Map view, the cursor is placed before the inserted string, though you can control this behavior with the set docmappastecaret=off option.
The insert function will not do a pending delete regardless of the setting of set pendingdelete.
Related Topics
insert_string command
window_doc built-in function
set docmappastecaret command