{{htmlmetatags>metatag-robots=()
metatag-title=(LOCATE | ugBASIC User Manual)
metatag-keywords=(ugBASIC,Commodore 64,Commodore PLUS/4,ZX Spectrum)
metatag-description=(Manual page for LOCATE)
metatag-media-og:image=(:ugbasic:logo-ugbasic-fb.png)
metatag-og:title=(LOCATE | ugBASIC User Manual)
metatag-og:description=(Manual page for LOCATE)
}}
====== ugBASIC User Manual ======
===== LOCATE ✓ =====
===== SYNTAX =====
LOCATE [x],[y]
==== PURPOSE ====
The ''LOCATE'' command moves the text cursor to specific coordinates,
and this new location sets the start position for all subsequent
text printing until commanded otherwise.
All console positions are measured in “text coordinates”, which are
measured in units of one printed character on console, with the
x-coordinate controlling the horizontal position and the
y-coordinate referring to the vertical.
The top left-hand corner of the console has coordinates of 0,0
whereas text coordinates of 15,10 refer to a position 15 characters
from the left-hand edge of the console and 10 characters from the top.
The range of these coordinates will depend on the size of your character
set and the dimensions of the display area allocated, known as a “console".
All coordinate measurements are taken using text coordinates relative to
the current console. If you try and print something outside of these
console,the console will be automatically scrolled down.
The current console is automatically treated as a window, so there is no
need to "open" one.
==== EXAMPLE ====
LOCATE 15,0
LOCATE ,20
See also the following example files:
* ''[[https://github.com/spotlessmind1975/ugbasic/tree/main/examples/texts_position_01.bas|texts_position_01.bas]]''
* ''[[https://github.com/spotlessmind1975/ugbasic/tree/main/examples/texts_position_02.bas|texts_position_02.bas]]''
==== ABBREVIATION ====
Lc
==== AVAILABLE ON ====
==== SEE ALSO ====
[[AT$]] [[CMOVE]]
==== ANY PROBLEM? ====
If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please [[https://github.com/spotlessmind1975/ugbasic/issues/new?title=ISSUE ON LOCATE|open an issue]] for this keyword on GitHub. Thank you!===== POWERED BY =====
[[:ugbasic:user:index|{{ :ugbasic:user:logo-ugbasic.png?nolink&600 |}}]]