A method of implementing fixed-width data types which are not directly
supported by a programming language, in a portable manner. A set U of
required fixed-width data types, an ordered set B of basic data types and
a set V with all possible data type widths are provided as inputs (201).
A generic data type G having an integer parameter and a data type
parameter is created (202). For every data type width WVj from set V and
basic data type Bi from set B a specialized data type G is created (203).
Then, each required data type Uk from set U of required data types is
implemented by creating and mapping required data type Uk to the
implementation of Uk provided by the generic data type G11 having the
parameters data type width WB1 and basic data type B1 (204).