Primitive Base Types

Primitive Types

Of course, Pandore uses all the C++ primitive base types (char, unsigned char, int, long, long long, long double ...). Nevertheless, some of these types had been redefined so as to be independent from the host platform and to produce portable code.

These types redefine the related C types so as to keep always the same size whatever is the machine word size. There are renamed by reusing the name of the C type except that the first letter is uppercase and a U is added to unsigned type.

The primitive types are:

Warning:

The Errc type

The type Errc allows the representation of any value of the predefined types, plus a new enumerated type: {SUCCESS, FAILURE}. This type is generally used as the return type for the operator function.

A variable of this type can be set with any value of the primitive type and can be changed at any time. For example:

Errc Operator() {
   if ( ... ) return (Char)0;
   if ( ... ) return 50.0F
   return SUCCESS; 
}

void main() {
   Errc a;
   a=Operator();
   if (a==SUCCESS) ...
   else if (a>50.0F) ...;
}

The Pantheon project
Image Team GREYC Laboratory
UMR CNRS 6072 - ENSICAEN - University of Caen, France
This page was last modified on 19 June 2015