FUNCTIONS CORE

SetPosBS()

Move the cursor one column to the right

Syntax

Signature
SetPosBS( ) --> NIL

Arguments

None.

Return value

NIL.

Description

SetPosBS() moves the cursor one column to the right in the same row. It does not check the border of the screen.

Notes

SetPosBS() needs a GT.

Example

SetPosBS.prg
#if OS_LINUX
   REQUEST GTXWC
#else
   REQUEST GTWVT
#endif

PROCEDURE Main()

   LOCAL nRow, nCol

   Scroll()
   SetPos( 5, 10 )
   SetPosBS()

   /* read the cursor at once: the output of Check() moves it */
   nRow := Row()
   nCol := Col()

   SetPos( 0, 0 )
   Check( 'the row stays                    ', nRow, 5 )
   Check( 'the column moved by one          ', nCol, 11 )

   QOut( "" )
   QOut( "Any key or 10 seconds ends the program" )
   Inkey( 10 )

RETURN

STATIC PROCEDURE Check( cTitle, xResult, xExpected )

   QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )

RETURN

Output

the row stays                    OK
the column moved by one          OK

See also