next up previous contents
Next: Conditionals Up: Modules Previous: Structured data types   Contents

Defined types

A type definition (typedef) is a special kind of module declaration with no parameters, and a slightly different syntax. The definition of ``hands'' above can equivalently be written as

        typedef hands struct{
          left, right : boolean;
        }

The general form of this declaration is

        typedef <name> <type>
where <type> is any legal type specification.



2002-10-28