Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Exit current loop iteration and start another one.

 

Syntax

 

ITERATE { FOR | WHILE | DO }

 

Returns

 

Parameters

 

Remarks

 

Restrictions

 

See also

 

EXIT

 

Examples

 

Thanks to Petr Schreiber for the following script example

Type tAgenda

  age            As Byte ' Years

  payment        As Long ' Money

  drivingLicense As Byte ' 0 = no, 1 = yes

End Type

 

%ITEMS = 3

DIM Person(%ITEMS) AS tAgenda

DIM index          AS LONG

 

Person(1).age = 24

Person(1).payment = 1000

Person(1).drivingLicense = 1

 

Person(2).age = 32

Person(2).payment = 1000

Person(2).drivingLicense = 0

 

Person(3).age = 64

Person(3).payment = 1000

Person(3).drivingLicense = 1

 

' -- Raise payment for people older and equall to 32, and in case they

' -- have driving license too then some money extra

For index = 1 To %ITEMS

 

  If Person(index).age < 32 Then ITERATE For ' -- Too young, quickly jump to NEXT person index 

  Person(index).payment = Person(index).payment + 1000

 

  If Person(index).drivingLicense = 0 Then ITERATE For ' -- No driving license, quickly jump to NEXT person index 

  Person(index).payment = Person(index).payment + 500

 

Next

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software