X(): Difference between revisions

From Liberty BASIC Family
Jump to navigation Jump to search
No edit summary
 
m (1 revision imported)
 

Latest revision as of 03:04, 11 October 2023

Not supported in Just BASIC Not supported in Liberty BASIC Not supported in Liberty BASIC 5 Supported in Run BASIC

Description

You can retrieve the current pen positions X coordinate with the X() method

Syntax

  1. #handle X() - Return the current X-axis position of the pen

Hints

Place useful hints about this keyword here

Example

'create a graphic object
graphic #g, 800, 600

'locate the drawing pen at 10,10
#g place(10,10)

'retrieve the X coordinate of the pen
posX = #g X()

'retrieve the Y coordinate of the pen
posY = #g Y()

'print the info in the graphic object
 #g "\The pen position is ";posX;", ";posY

'display graphic on web page
render #g

Useful Procedures

' Place a useful function or sub using this keyword here