CircuitGizmos

Electronic Products for Creative Minds

  • Home
  • Gizmo Store/Products
  • Documentation/Datasheets
  • Projects/Libraries
  • GizmoBlog
  • Services/Contact
    • Design
    • Contact Gizmo!
  • Your Gizmo Cart
    • Your Account

FOR TO STEP

FOR counter = start TO finish [STEP increment]

Initiates a FOR-NEXT loop with the ‘counter’ initially set to ‘start’ and incrementing in ‘increment’ steps (default is 1) until ‘counter’ equals ‘finish’.
The ‘increment’ must be an integer but may be negative.


1
2
3
4
5
6
7
8
10 Data 1, 2, 3, 4, 5, 6, 7, 8, 9
20 Dim var(9)
30 For loop = 1 To 9
40 Read var(loop)
50 Next loop
60 For loop = 1 To 9
70 Print var(loop)
80 Next loop

> run
1
2
3
4
5
6
7
8
9


See also:
DO LOOP
DO LOOP UNTIL
DO WHILE LOOP
EXIT
EXIT FOR
LOOP UNTIL
NEXT
WHILE WEND

LOOP UNTIL

LOOP [UNTIL expression]

Terminates a ‘DO’ program loop.

See also:
DO LOOP
DO LOOP UNTIL
DO WHILE LOOP
EXIT
EXIT FOR
FOR TO STEP
NEXT
WHILE WEND

NEXT

NEXT [counter-variable] [, counter-variable]…

NEXT comes at the end of a FOR-NEXT loop.

The ‘counter-variable’ specifies exactly which loop is being operated on.

If no ‘counter-variable’ is specified the NEXT will default to the innermost loop. It is also possible to specify multiple counter-variables as in:


NEXT x, y, z

1
2
3
4
5
6
7
8
10 Data 1, 2, 3, 4, 5, 6, 7, 8, 9
20 Dim var(9)
30 For loop = 1 To 9
40 Read var(loop)
50 Next loop
60 For loop = 1 To 9
70 Print var(loop)
80 Next loop

> run
1
2
3
4
5
6
7
8
9


See also:
DO LOOP
DO LOOP UNTIL
DO WHILE LOOP
EXIT
EXIT FOR
FOR TO STEP
LOOP UNTIL
WHILE WEND

  • « Previous Page
  • 1
  • 2
  • 3
  • Next Page »

A Ton of Documentation

Open all | Close all

Projects made by Gizmo, Friends, and Members

open all | close all

Recent GizmoBlog Musings

  • Altair 8800 using a ColorMax!
  • Re-energizing the ColorMax, Pt. 3

Visit us!

  • Facebook

Electronic Products for Creative Minds

CircuitGizmos is your source for electronic products that help you create your embedded projects. Here at CircuitGizmos.com you will find a friendly store filled with creative products and all of the documentation that you need to use these gizmos.

We create devices that we believe make electronics fun, but we also know that our products are used for professional designs. For decades we have designed products for commercial, military, and medical industries. Our gizmos here are great for engineers and hobbyists alike.

Copyright © 2008+ CircuitGizmos, L.L.C. All rights reserved

Image already added

Recently Viewed Products

Copyright © 2021 · Generate Pro Theme on Genesis Framework · WordPress · Log in