>I noticed that I kept running up against a slightly obscure abiguity in
>HDirect while trying to simulate the correct marshalling routine for an
>array of strings. It turns out that the abiguity stems from the two
>semantically different ways a string can be represented in C. That is, a
>string can be defined either as an array of characters or as a pointer
>to a character.
This reminds me of the following passage from the documentation for xctocc, an
HDirect-like tool for interfacing MzScheme with C++.
Note that the type string is used for the color name instead of char*. This is
because char* in C++ could mean:
-- A null-terminated string
-- A pointer to a single character
-- A pointer to a fixed-length array of characters
-- A string or NULL
-- A pointer to a character of NULL
-- A pointer to an array or NULL
In xctocc, these types must all be distinguished so that the proper glue code can be
generated.
And they say C++ is object-oriented...!
--FC