Directly Assigning the Virtual Cursor Location

You can also place the virtual cursor by direct assignment of a value to the window structure members holding the coordinates of the virtual cursor, wnp->r and wnp->c. The following code is the equivalent to the call to cs_mv() made above.

wnp->r = 3;

wnp->c = 5;

Note: It is not generally a good idea to reference structure members directly, because the name of the member could change in future releases. However, there are a few structure member names that are unlikely to change. wnp->r and wnp->c fall into this category.


Home Contents Previous Next