Platform- and User-defined Types

Platform-defined types

Each platform defines a number of custom enumeration types, which are groups of related constants.

The list of available types can be found in the Project Browser pane: View > Project-Browser, then Platforms -> Types.

User-defined types

In Tibbo BASIC, a new variable type can be defined using the type construct.

In addition, you can define your own enumeration types.

In Tibbo C, in addition to the struct and union constructs there is also a typedef keyword. It allows you to define your own variable types:

** Tibbo C **

typedef unsigned char U8;            //defining a different name for an existing variable type
U8 x;

typedef struct data_packet_struct{   //a new type of structure...
   U8 len;
   U8 packet_data[200];
}data_packet;                        //... and an immediate declaration of a variable of this type...

data_packet_struct outgoing_data;    //... and another variable of this type