[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

A data section is a chunk with ckid "form" and this arrangement:

    FORM       ::= "FORM" #{ FormType (LocalChunk | FORM | LIST | CAT)* }
    FormType   ::= ID
    LocalChunk ::= Property | Chunk

The ID "form" is a syntactic keyword like "struct" in c.  think of a
"struct ilbm" containing a field "cmap".  if you see "form" you will know
to expect a FORM type ID (the structure name, "ilbm" in this example) and
a particular contents arrangement or "syntax" (local chunk, forms, lists,
and cat ).  a "form ilbm", in particular, might contain a local chunk
"CMAP", an "ILBM.CMAP" (to use a qualified name).

So the chunk id "form" indicates a data section.  it implies that the
chunk contains an id and some number of nested chunks.  in reading a form,
like any other chunk, programs must respect its ckSize as a virtual
end-of-file for reading its contents, even if they're truncated.

The form type is a restricted id that may not contain lower case letters
or punctuation characters.  (Cf. Type IDs.  Cf. Single Purpose Files.)

The type-specific information in a form is composed of its "local chunks":
data properties and other chunks.  each form type is a local name space
for local chunk ids.  so "cmap" local chunks in other form types may be
unrelated to "ILBM.CMA"".  More than that, each FORM type defines semantic
scope.  If you know what a FORM ilbm is, you will know what an ilbm.cmap
is.

Local chunks defined when the form type is designed (and therefore known
to all clients of this type) are called "standard" while specialized ones
added later are "nonstandard".

Among the local chunks, property chunks give settings for various details
like text font while the other chunks supply the essential information.
This distinction is not clear cut.  A property setting can be cancelled by
a later setting of the same property.  E.g., in the sequence:

        prop1 = x  (Data A)  prop1 = z  prop1 = y (Data B)

prop1 is = x for Data A, and y for Data B.  The setting prop1 = z has no
effect.

For clarity, the universally reserved chunk ids "list", "form", "prop",
"cat ", "    ", "lis1" through "lis9", "for1" through "for9", and "cat1"
through "CAT9" may not be FORM type IDs.

Part 5, below, talks about grouping forms into lists and cat s.  they let
you group a bunch of FORMs but don't impose any particular meaning or
constraints on the grouping.  Read on.