[Next] [Up] [Previous] [Contents]
Next: Conditionals Up: Modules Previous: Structured data types

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.



Ken McMillan
Sat Jun 6 21:41:59 PDT 1998