Sunday, 20 February 2011

Array

Array Example

Dim Grade (13) as String
Dim index as Integer
For Index = 0 to 13
                         
Student.Grade(Index) = "A"
Grade(3) 

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.

Thursday, 17 February 2011