Sunday, 20 February 2011

Loops



There are three types of loops:
  • For....Next
  • Do White
  • Loop...Until 
Each Loop performs a similar function however each one has its own individual specialty 

For....Next
This loop is used to run a piece of code a which is a fixed number. As its name suggest, it is used when a function needs to be carried out several items, therefore it is identical processing. The For...Next loop changes a variable every time it runs.

Loop...Until loop
Target loop, keeps looping until target is reached

Do While
Runs a piece of code that reacts to change, is sensor and monitors change.

No comments:

Post a Comment