BASIC GET SCREEN Statement - fvdhoef/aquarius-plus GitHub Wiki

GET SCREEN

TYPE: plusBASIC graphics statement


FORMAT: GET SCREEN ( startcol , startrow ) - ( endcol , endrow ) , *arrayname

Action: Copies a rectangle section of text screen characters and colors to a numeric array.

  • startcol and startrow specifies the upper-left corner of the rectangle.
  • endcol and endrow specifies the lower-right corner of the rectangle.
  • arrayname is the name of the array to copy the screen data into.
    • The array must already be DIMensioned to a size large enough to hold the data.
    • To calculate the size of an array needed to store the elements in a rectangle:
      • Multiply the width of the rectangle in columns by the height in lines.
      • Round up to an even number
      • Divide by two
  • Illegal Quantity results from any of the following conditions:
    • startcol or endcol are not in the range 0 through 39.
    • startrow or endrow are not in the range 0 through 24.
    • endcol is less than startcol or endrow is less than startrow.

Examples:

10 DIM A(13)
20 GET SCREEN (2,3)-(7,8),*A

Copies text screen contents from column 2, line 3 to column 7, line 8 into array A().