4D v13

Referring to Characters

Home

 
4D Write v13
Referring to Characters

Referring to Characters  


 

 

A character in a document is referred to by its sequential number. Commands that refer to characters enable you to specify either a single character or a range of characters. For example, you can specify a word, a sentence, or whole blocks of text to be selected.

You use the WR GET SELECTION command to determine the positions of selected characters in a 4D Write area. The command uses the $First and $Last parameters to refer to the range of selected characters. The $First parameter is always one less than the first character selected. The $Last parameter is equal to the last character selected.

Example  

For example, the following expression returns the positions of the selected text in Area into the $First and $Last variables:

 WR GET SELECTION(Area;$First;$Last)

To select text in a 4D Write area, you need to reference characters. In most cases, you must first select text before using a command to manipulate it.

 
PROPERTIES 

Product: 4D
Theme: 4D Write, Introduction to the language

 
SEE ALSO 

Documents in 4D Write Areas