[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
27.1.6 Defining an extern type
New Bigloo types can be defined using extern <type-clause>. These newly introduced types can be used in any declaration (that is in any extern or Scheme module clause and in any Scheme variable or function definition). The syntax of <type-clause> is:
<type-clause> →(type
<ident> <type-def> <string>)
<type-def> → <atomic-type> | <ident> | <struct-type> | <union-type> | <function-type> | <array-type> | <pointer-type> | <enum-type> | <opaque-type>
The symbol <ident> is the Scheme name of the introduced type and
<string> is the C name of the type. When Bigloo produces the definition
of a variable v of type s, it produces the following C code: s v;
.
This rules applies unless s is a pointer or an array and then, to
produce a C definition, the name of the elements of the array or the elements
pointed by the pointer type are used. Hence, if v is for instance foo
and s is (array int)
the produced C code will be: int *foo
.
27.1.6.1 Atomic types | ||
27.1.6.2 Struct and Union types | ||
27.1.6.3 C pointers | ||
27.1.6.4 C null pointers | ||
27.1.6.5 C arrays | ||
27.1.6.6 C functions | ||
27.1.6.7 C enums | ||
27.1.6.8 C opaques |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 31, 2014 using texi2html 5.0.