Arrays for Enthusiasts

You should be familiar with the material in our main Array Tutorial before tackling these sections. This tutorial covers dynamic arrays, array parameters then vector processing.

The arrays we covered in the main array tutorial were static. You declare a dynamic array without setting the bounds, then set its size. In this way a dynamic array obtains its size at runtime and is therefore matched exactly to its requirement. This is particularly useful when you have arrays that potentially need much memory such as when holding objects of enemies in a game.

Array parameters can be of a defined type if all the arrays passed to the routine have the same bounds. If they have different bounds then you must use open array parameters. The size of the array is then determined by the array argument that you pass to it.

Vector processing is an example of parallel processing. You have the opportunity to carry out vector processing when you use the MMX functionality of an Intel chip.

Follow the links below to the three sections of this tutorial which provide demonstrations and further details.

Programming - a skill for life!

Pascal Programming Tutorials