Interesting...
Tables

A table is essentially an array of records - each element of the array is a record that has a number of fields of possibly different types. A table is generally held in the computer's memory and is used to 'look up' information.

A hash table is a special table which holds variable names and their addresses, so that the address of any variable can be quickly looked up.

Example : A teacher might have a list of pupil names,  forms and exam marks. If he wants to know what exam mark a certain pupil had, then he looks down the list of names until he finds the one he wants, then looks across to the corresponding mark.

Marks is a table of pupils and their exam marks.
Each record has three fields:

  • Name : String
  • Form : String
  • ExamMark : Integer
  Name Form ExamMark
0 Tom Jones 11G 78
1 Bessie Smith 11B 56
2 John Conrad 11G 46
3 Sarah Williams 11Y 88

This table has 4 records.

Marks[2].Name is 'John Conrad' - a subscript and a field name is needed.

 

 

   Back