Available on:
Alias: BOX

REC

REC draws a rectangle. The location of the top left corner is determined by the first two parameters x and y, the width and height of the rectangle by parameters three and four (sa and sb). The color of the edge lines is determined by the last parameter (fq, color source). The four corners of the rectangle are always drawn.

Permissible values are 0..SCREEN WIDTH for x and sa. For y or sb, values from 0 to SCREEN HEIGHT are permitted in both cases. The color also depends on the graphics mode and refers to the color specifications behind HIRES on the one hand and MULTI and LOW COL on the other. The point 0,0 is in the top left corner.

Note: If the edge lengths of the rectangle exceed the screen limits, rectangle will be clipped.

SYNTAX

 REC x, y, sa, sb, fq


Legend
  • id : identifier
  • type : datatype
  • v : value
  • "..." : string
  • [...] : optional

EXAMPLE

 REC x, y, 29, 19, 1


Used in:

ABBREVIATION: Rc

Join BASIC 10Liner Contest with ugBASIC!

An interesting competition is held at the beginning of each year: the BASIC 10Liner Contest. It is possible to use ugBASIC to participate in the next "BASIC10Liner" competition, in the following categories:

  • PUR-120 - A game in 10 lines of max 120 characters (w/abbrev.)
  • EXTREME-256 - A game in 10 lines of max 256 characters (w/abbrev.)
  • SCHAU - Any program in 10 lines of max 256 characters (w/abbrev.)
In order to reduce space you can use this abbreviation for this instruction:

REC ↔ Rc

Any problem?

If you have found a problem with this keyword, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!

open an issue BACK TO KEYWORDS