DADiSP Worksheet Functions > Function Categories > Cursor Functions > CURNPUT

 

CURNPUT

Purpose:

Sets the cursor index position.

Syntax:

CURNPUT(win, index, item, cursor)

win

-

Optional. Window reference. Defaults to the current Window.

index

-

An integer. The index in the item.

item

-

Optional. A positive integer. The index to the item in the Window. Defaults to 1.

cursor

-

Optional. A positive integer. The index of the column cursor in the item. Defaults to 1, the first cursor.

Example:

W1: integ(gnorm(1000, 1/100));curnput(50)

a = curpos(w1)

 

W1 contains a 1000 point series and the first cursor is set to index 50, X location 0.49. Variable a contains the value 50.

Example:

W1: gnorm(1000, 1/10)

W2: W1

 

curnput(w1, 100);curnput(w1, 300, 1, 2);

curextract(w1, w2);

 

W1 contains a 1000 point series and W2 contains a copy of W1. The first cursor of W1 is set to index position 100 and the second cursor is set to index 300. W2 then extracts the region from index 100 to index 300 of its original data resulting in a 200 point series.

Remarks:

If the index is less than one, then the cursor will be set to one. If the index is greater than the number of points in the item, then the cursor will be set to the number of points in the item.

 

See CURPOS to return the index location of the cursor.

 

See CURPUT to set the cursor to a specified X location.

See Also:

COLNMOVE

COLNPUT

COLPOS

CURMOVE

CURNMOVE

CURPOS

CURPUT

CURSORON