Documentation of D arrays

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Fri Jan 12 02:15:27 PST 2007


Sebastian Biallas wrote:
> Frits van Bommel wrote:
>> Sebastian Biallas wrote:
>>> BtW: What exacly happens on:
>>>
>>> a = b ~ c and a ~= b
>>>
>>> ? Is this some build-in opCat? What are the semantics?
>> You can see it as a built-in opCat if you like.
>> What happens behind the scenes is that a function in the runtime is called.
>> The source to these functions is in dmd/src/phobos/internal/gc/gc.d if
>> you really want to know exactly what they do... (_d_arraycat for ~,
>> _d_arrayappend for ~= with array, _d_arrayappendc for ~= with single
>> element)
> 
> Well, I found out by inspecting the disassembly, but I prefer to have
> spec on which I can rely on.

This isn't in the spec. And it shouldn't be in the spec. This is 
(compiler) implementation-dependent stuff.

All you need to know is that it works ;).



More information about the Digitalmars-d mailing list