[Prev][Next][Index][Thread]

Re: GD: <c-string> question



On Thu, Jan 27, 2000 0:45 Uhr, Andreas Bogk <mailto:andreas@andreas.org>
wrote:
>"Gabor Greif" <gabor@mac.com> writes:
>
>> Right now I use
>> make(<c-string>, string: "Hello")
>> which works, but is it OK?
>
>I'm astonished that this works, it shouldn't as far as I understand
>the code. What you usually do is:
>
>as(<c-string>, "Hello");
>
Ooops, maybe make(<c-string>, ...) does not check for the keyword
arguments?

In my code

make(<c-string>, string: "Hello")

does not cause any errors or warnings, and the result is successfully used
in comparison operations.


>Working on native Dylan strings has a couple of advantages, such as
>working bounds checking, 0 allowed as a character in the string,
>etc. Only use a c-string when passing to native C code. In an ideal
>world, you wouldn't even notice the existence of this class.
>

Yep. I need <c-string>s for interfacing with a plugin that has a C API. I
am using mac-d2c and I am not aware of a way how to generate melange
interfaces.

>Andreas
>


	Gabor