version 6.5
WR GET PARAGRAPHS (area; beginPara; endPara)
Parameter | Type | Description | |
area | Longint | 4D Write area | |
beginPara | Longint | Beginning of the paragraph to return | |
endPara | Longint | End of the paragraph to return |
Description
The WR GET PARAGRAPHS command returns the position of the first character of the first paragraph of the selection and the position of the carriage return of the last paragraph of the selection, in the 4D Write area referenced by area.
Example
The following example scans the document and retrieves the position of the first and last character for each paragraph.
`Locating the cursor at the beginning of the area WR SET SELECTION (area;0;0) `Counting the number of paragraphs in the document nbPara:=WR Count(Zone;wr nb paragraphs) `Processing paragraphs one by one For ($i;1;nbPara) `Retrieving the position of the first and last characters WR GET PARAGRAPHS(area;begin;Pos) `Relocating after the last processed paragraph WR SET SELECTION (area;Pos;Pos) End for
See also
WR Get selected text, WR GET SELECTION, WR Get text.