Traversing an array

Traversing an array is the process of working through an array one index at a time, either to input data to it, output data from it, or read data from it.

The process must use a loop but it can be either fixed or conditional.

The UBound function is extremely useful here as a way of checking when the last index is reached.

Example code – output from an array using a fixed loop     show
Example code – output from an array using a fixed loop and UBound     show
Example code – output from an array using a conditional loop     show

Back to index

mph@ghscomputing.co.uk

Updated 09 December 2018