# Array keywords

Certain values are organized into arrays. Each array is represented by a keyword of type Array. For an Array keyword, the following syntax is used:

Syntax | Description
--- | ---
keyword[item#] | Represents item# in array keyword. Arrays are zero based. For example, if the first item assigned to array keyword DSPFile is file1.dsp, and the second item in the array is file2.dsp, then DSPFile[0]=file1.dsp and DSPFile[1]=file2.dsp.
keyword.Count | Read-only keyword indicating the number of items assigned to array keyword. For example, if there are five items assigned to array keyword DSPFile, then DSPFile.Count=5.

If keyword.Count is 0, the array is empty. You can set an item of an empty array to a value, implicitly allocating space within the database record. For example, if the default configuration for a board lists no TCP files, then invoking oamGetKeyword with the keyword TCPFiles.Count returns 0. However, you can set TCPFiles[0] to a value (such as nocc). Then when you invoke oamGetKeyword again for the keyword TCPFiles.Count, the function returns 1.

The Array keyword itself without an index does not represent a value. For example, if oamGetKeyword is performed for keyword DSPFile (without an index), the error OAMERR_NOT_FOUND is returned.

Set each array item individually. The utility oamsys translates a line from a board keyword file into separate assignments for each item. For example, if the board keyword file contains the following entry:

Resource[1].DSPs = 1 2 3

oamsys translates this entry into the following items:

Resource[1].DSPs[0] = 1
Resource[1].DSPs[1] = 2
Resource[1].DSPs[2] = 3