System Functions
@X( ) / @Y( ) Convert X/Y Coordinates
   
Formats
1. Return Column Position: @X(col[,chan][,ERR=stmtref]) 
2. Return Line Position: @Y(line[,chan][,ERR=stmtref])
3. Return Pixel Position:  @X( = pixel [,chan][,ERR=stmtref])
or: @Y( = pixel [,chan][,ERR=stmtref])

Where:

chan Channel or logical file number of the device or file.
col Standard print position column number . Numeric expression.
line Standard print position line number. Numeric expression.
pixel Absolute pixel position desired. Numeric expression.
stmtref Program line number or statement label to which to transfer control.
   
Return Integer value. When used with col or line values returns the logical graphical unit for the position requested. When used with pixel, returns graphical unit value respresenting the pixel.
   
Description
Format 1 & 2
Logical Addressing:

Use these functions to convert column and line number addresses for graphics output into x- and y-axis coordinates in Graphical Units. The values returned are integers.

In the example below, the functions return 16 graphical units as the coordinate for column 1 and 60 for line 2:

->0010 LET A=1, B=2
-:0020 PRINT @X(A),@Y(B)
-:RUN
16 60

These functions take the column/line numbers and, based on your given channel, return the corresponding graphics coordinates. Numeric variables, fractions and negative numbers are allowed as column and line values.

If you do not include a channel, the default is 0 (zero), the terminal/console. If you use either of these functions in a print statement, the output will go to the channel or logical file number you specify in the PRINT directive; i.e., to a terminal, file or printer.

   
Description
Format 3
Direct Pixel Addressing:

These functions convert and absolute pixel address into a logical Graphic Units. Technically if the absolute value of a Graphical Unit is > 10000 it represents an actual pixel address thus @X(=100) will return 10100, @X(=-240) returns -10240.

While technically you could compute the graphical units directly in the application, these functions are provided to allow for future expansion as the resolution of output devices increase.

There is no difference between @X(= or @Y(=. They both return the same values.

Direct Pixel addressing is a +PxPlus Exclusive

   
Examples

1010 PRINT @(5,5),"CUSTOMER LISTING",
1020 PRINT 'FILL'(0,0),'RECTANGLE'(@X(4),@Y(5),@X(22),@Y(6)),

When the example above is RUN, the words "CUSTOMER LISTING" are displayed on the screen, outlined by a rectangle. The @X(col) values start the rectangle at the graphical equivalent of column 4 (one column before the text) and end it one column after the text. The @Y(line) values are equivalent to lines 5 and 6, and they define the rectangle as 1 line high starting at the top of line 5.