Searching the digitalmars webpage

Ary Borenszweig ary at esperanto.org.ar
Wed Jan 30 04:39:42 PST 2008


I've already found it. But, for example, you can use opCall with 
classes. Why opCall isn't also explained in "Classes"?

Another example: I want to see how to implement opApply correctly. I 
must enter "Statements", go to the "foreach" section, and there it is. I 
know this because I tried several links before I found it. Is there an 
index of keywords and concepts? It would be much simple to find 
something with it.

Extrawurst wrote:
> see http://www.digitalmars.com/d/2.0/struct.html under "Dynamic 
> Initialization of Structs"
> 
> 
> 
> Ary Borenszweig schrieb:
>> Extrawurst wrote:
>>>
>>>
>>> Ary Borenszweig schrieb:
>>>> Saaa escribió:
>>>>> S s = 3;    // sets s.a to 3
>>>>> S t = s;    // sets t.a to 3, S.opCall(s) is not called
>>>>
>>>> opCall is used like this:
>>>>
>>>> S s = S(3);
>>>> S t = S(s);
>>>>
>>>> I don't know why your first statement works. I think it's because S 
>>>> is just a wrapper for an int, so an int can be implicitly casted to S.
>>>
>>> the first statement works cause he created an opCall for S to be 
>>> called with just an int. the second statement doesn't call S 
>>> opCall(S) cause a struct assign expression just performs a memory 
>>> copy when S t = s; to have the second opCall called u would have to 
>>> write what Ary suggested: S t = S(s);
>>>
>>> ~Extrawurst
>>
>> Sorry, I didn't know that.
>>
>> I wanted to see where opCall is explained in the digitalmars page... 
>> but each time I want to search a concept, if I use search box, it 
>> gives me only results of the newsgroups archives. Otherwise, I have to 
>> guess where in the left navigation bar I have to click. Isn't there an 
>> index of keywords or important concepts?


More information about the Digitalmars-d-learn mailing list