Skip to main content

Arrays

  • Chapter
  • 140 Accesses

Part of the book series: Macmillan Master Series ((PMSC))

Abstract

An array stores more than one value, of a common data type, under a collective name. Each value has a unique slot and is referenced using an indexing technique. Figure 9.1 shows a circuit with five resistors, which could be declared with a program with five real declarations. If these resistor variables were required to be passed into a function all five would have to be passed through the parameter list. A neater method uses arrays to store all of the values under a common name (in this case R). Thus a single array variable can then be passed into any function that uses it.

Simple variables against array indexing

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Copyright information

© 1998 William Buchanan

About this chapter

Cite this chapter

Buchanan, W. (1998). Arrays. In: Mastering Pascal and Delphi Programming. Macmillan Master Series. Palgrave, London. https://doi.org/10.1007/978-1-349-14770-0_9

Download citation

Publish with us

Policies and ethics