Q(uick)BASIC Keyword: STEP

Quick View

STEP Keyword

Different Uses

Worth knowing

Useful and cross-version information about the programming environments of QBasic and QuickBasic.

Description/Parameter(s)

In a FOR...NEXT loop, specifies how much to increase the counter in each iteration. In graphics statements, specifies that pixel coordinates are relative to the current graphics cursor position.

Description/Parameter(s)

Use the STEP keyword to

  • indicate how much to increase or decrease the loop counter after each iteration of a FOR...NEXT loop.
  • in graphics statements, to indicate that the pixel coordinates that follow STEP are relative offsets from the last location of the graphics cursor on the screen, rather than absolute distances from the upper left corner of the screen.
Description/Parameter(s)

Use the STEP keyword to:

  • Indicate how much to increase or decrease the loop counter after each iteration of a FOR...NEXT loop.
  • In graphics statements, to indicate that the pixel coordinates following STEP are relative offsets from the last location of the graphics cursor on the screen, rather than absolute distances from the upper left corner of the screen.