EndOfLine, EndOfLine()

Syntax

EndOfLine [Select]

EndOfLine ([Select])

Remarks

The EndOfLine statement moves the insertion point or, if Select is nonzero, the active end of the selection (the end that moves when you press SHIFT+END) to the end of the current line or the line that contains the active end of the selection. If there is a paragraph mark at the end of the line, EndOfLine positions the insertion point to the left of the paragraph mark; EndOfLine 1 moves the active end of the selection over the paragraph mark.

The EndOfLine() function behaves the same as the statement and also returns one of the following values.

Value

Explanation

0 (zero)

If the insertion point or the active end of the selection was not moved (that is, if it was already at the end of the line)

–1

If the insertion point or the active end of the selection was moved


Avoid using EndOfLine by itself to go to the end of a paragraph unless you are sure that the paragraph is a single line (for example, a word in a list of words). Instead, use the following instructions:


ParaDown        'Go to start of next paragraph
CharLeft        'Go back one character

Examples

This example selects the current line and the paragraph mark (if there is one at the end of the line). The instruction EditGoTo "\Line" has the same effect.


StartOfLine
EndOfLine 1

The following example selects the current line but not the paragraph mark (if there is one at the end of the line):


EndOfLine
StartOfLine 1

See Also

EndOfRow, ParaDown, StartOfLine