1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

  • A register variable is stored in a machine register, if one
    is available - this is only a hint to the compiler that the
    variable is heavily used and the procedure may run faster
    if the variable is stored in a register


Typedef
*typedefcan be used to declare a name for a type, this
doesn't declare a new type, it just creates a name for an
existing type

  • A typedef declaration has the following format


typedef type TypeName ;


For example:


typedef char* String;


We can now use string in place of a type in a variable
declaration:

String s;

This allows us
*to hide the definition of types in include files,
*to change the type without changing all the usages,
*to provide a short form for more complex types --less to
enter and remember

March 3, 1998

Page 18

C201/TAM