
Next: Macros
Up: xctocc Syntax
Previous: Instance Variable Declarations
These basic types are as in C++:
- int
- short
- long
- unsigned
- float
- double
These type as similar to C++ types, with extended Scheme meaning:
- char -- a character in Scheme
- byte -- like a C++ char, but a number in Scheme
- Long -- forced to be an integer from Scheme
(i.e. the parameter cannot be an inexact number)
- Double -- forced to be a floating-point number from Scheme
(i.e. the parameter cannot be an exact integer)
- string -- a null-terminated string; char * in C++
- nstring -- a null-terminated string or NULL; char *
in C++
- cstring -- a constant string; const char * in C++
- ncstring -- a constant string or NULL; const char *
in C++
- ustring -- a null-terminated string; unsigned char * in C++
- nustring -- a null-terminated string or NULL; unsigned char *
in C++
- custring -- a constant string; const unsigned char * in C++
- ncustring -- a constant string or NULL; const unsigned char *
in C++
- bool -- a boolean in Scheme; the C++ representation must
be specified with @BOOLEAN
When a type is followed by * , then the type is interepreted
as a modifiable (single) indirect value.
When a type is followed by ? , then the type is interepreted
as a modifiable indirect value or a NULL pointer.
When a type is followed by & , then the type is interpreted
as call-by-reference (or return-by-reference).
When a type is followed by [] , then the type is interpreted
as an array; the value must be manually bundled and unbundled
with macros.
A class name can be used, followed by either !,
, or
% . ! indicates a pointer to an object,
indicates
a possibly NULL pointer, and % indicates a object passed
by reference.
Any other valid C++ type can be used, but the value must be manually
bundled and unbundled with macros.
An xctocc type is translated appropriately in the C++ glue
code. For example, Long? becomes
long * and MyClass% becomes MyClass&.

Next: Macros
Up: xctocc Syntax
Previous: Instance Variable Declarations
PLT