Saturday, June 18, 2022

πŸͺ² Get (graphics statement): specification of rectangle coordinates

 In wwwBASIC, the GET statement's rectangle coordinates must be specified as top-left and bottom right corners of the rectangle in that specific order.

The same corners specified in reverse order, or the opposite corners specified in any order, all will cause a program to fail without errors.

The version of wwwBASIC in the latest version of BAM modified the GET statement so any opposite corners in any order can be specified.  So any of the following will work:

  • top-left corner and bottom-right corner;
  • bottom-right corner and top-left corner;
  • top-right corner and bottom-left corner;
  • bottom-left corner and top-right corner

By the way, syntax for the GET graphics statement, as per many (most? all?) BASIC implementations:

GET (x1,y1) - (x2,y2), array_name

No comments:

Post a Comment

πŸ–₯ Pongy game

This program is a port (and slight mod) of the QB64pe program by SierraKen.  (SierraKen's program shared with the QB64pe community in th...