Links are not active on this page.
 INSMODE( ) Function

Returns the current insert mode, or sets the insert mode on or off.

INSMODE([lExpression])

Parameters

lExpression

Turns the insert mode on or off. INSMODE(.T.) turns the insert mode on and INSMODE(.F.) turns it off. A logical value corresponding to the insert mode setting before INSMODE(.T.) or INSMODE(.F.) was issued is returned.

Expand imageRemarks

If you omit the optional argument and the insert mode is on (characters are inserted before the cursor), INSMODE( ) returns true (.T.). If the insert mode is off (characters are overwritten at the insertion point), INSMODE( ) returns false (.F.).

Expand imageReturn Value

Logical

Expand imageExample

The example below uses INSMODE( ) to set the insert mode on, and then toggles the insert mode to the opposite state.

 CopyCode imageCopy Code
SET TALK ON
=INSMODE(.T.)  && Set insert mode on
? INSMODE( )
= INSMODE(!INSMODE( ))  && Toggle insert mode to opposite state
? INSMODE( )

Expand imageSee Also