Wize /
Typedef
Search:  

Typedefs

In addition to builtin types, a Wize program can declare it's own types using the new typedef command. Types are simply declared as a string and/or list. For example, the builtin type int can take parameters defining it's range. Typedef gives a shorthand way of defining types for simplified usage:

  typedef mynum {Int -min 0 -max 100}

The above is obviously simple and contrived. However, the main use of typedef will be in the struct and enum types which are still under development.

© 2008 Peter MacDonald

Page last modified on June 04, 2009, at 08:25 AM