Arbortext Command Language > Functions by Alphabetical Listing > forward_char
  
forward_char
forward_char (count[, doc])
 
This function moves the cursor count characters to the right in the document given by doc, or the current document if doc is omitted. If count is negative, then the logical cursor is moved left count characters. Each non-text object (that is, tags, equations, graphics) counts as one character. This function returns 1 (True) if the cursor was moved the specified distance. It returns 0 (False) if the end (or beginning) of the document was reached. Note, that forward_char(1) is similar to the command caret 0,+1, except that the function always moves one character.
The caret command treats the case of the cursor at the end of a screen line specially and moves the cursor to the beginning of the next line, which is before the same character. Because of this, for cases where the screen representation is not important or relevant (for example, for a document loaded with doc_open), forward_char is more useful.
Related Topics
caret command
doc_open built-in function