LOCATE statement

Purpose: LOCATE moves the console mode screen cursor to the specified coordinates. This function works only in console mode programs.


 Syntax:

 LOCATE Row%, Column% [, Cursor%, CursorSize%]

 Parameters:

  • Row% Vertical console mode screen position.
  • Column% Horizontal console mode screen position.
  • Cursor% [OPTIONAL] If set to 0 the cursor will be hidden, If set to 1 it will be visible. Default is 1.
  • CursorSize% [OPTIONAL] number between 0 and 99 indicating size, 12 is a normal cursor, 49 is half size and 99 is full size.

Example:


 LOCATE 5,10,1,99 : SLEEP(3000)  ' 99 = Full
 LOCATE 5,10,1,49 : SLEEP(3000)  ' 49 = Half
 LOCATE 5,10,1,12 : SLEEP(3000)  ' 12 = normal(default)

Remarks: LOCATE works only in console mode programs.

BCX Console Sample Programs using LOCATE statement.

S00.bas, S35.bas, S38.bas, S40.bas, S41.bas, S100.bas, S119.bas, S135.bas