INPUT /  OUTPUT /  LANGUAGE






carat field

Sample usage

Applies to

Behaviour

When one value is provided, positions the cursor before that character. The first character has position 1. When two values i,j are provided, creates a text selection spanning from character i to character j inclusive. The position i must precede position j in the text otherwise the selection is not valid. The value 0 represents the position after the last character in the text. Negative values indicate characters counted from the end instead of from the start, so carat=-1 positions the carat in front of the last character in the text.

As with most fields in ioL, the carat field must be assigned with an initial value when the tag is created if you wish to reference it later. It is sufficient to set carat=null when you create the tag.