Previous Topic: LiteralsNext Topic: Language Statement


Block Scope

The keywords "start" and "end" delimit the scope of a definition block. An associated keyword must follow both start and end. The keywords and their scope are listed in the following table:

Block

Within

Description

Component

.MIF file

Defines a component. All other blocks exist within this scope. There can be only one component definition per .MIF file.

Path

Component

Associates a symbolic string with operating system specific path names. Zero or more path definitions may exist in the MIF, usually at the top of the file before any groups.

Group

Component

Defines a collection of attributes, sometimes used as a template row for a table. At least one group is required per .MIF file (the ComponentID group, defined following).

Attribute

Group

Defines a unit of managed data. All attributes "exist" in the scope of a group definition. A group must contain at least one attribute.

Table

Component

Defines one or more instances of a group using a previously defined group. Optional.

Enum

Component or Attribute

Defines a list of integer-to-string mappings. Named enumerations can be defined at the component level, while unnamed enumerations can be defined in the scope of an attribute definition. Optional, but while many enum definitions can exist at the component level, only one can be defined per attribute.

Following is an example of a .MIF file structure. For readability, only one of each block is given. Each level is indented for readability:

start component
	start path
	end path
	start enum
	end enum
	start group
		start attribute
			start enum
			end enum
		end attribute
	end group
	start table
	end table
end component