clear()

Simen kjaeraas simen.kjaras at gmail.com
Mon Mar 28 21:55:10 PDT 2011


On Mon, 28 Mar 2011 16:57:17 +0200, Kai Meyer <kai at unixlords.com> wrote:

> On 03/25/2011 01:10 PM, Dr.Smith wrote:
>> To empty many arrays of various types, rather than:
>>
>> clear(arr1);
>> clear(arr2);
>> ...
>> clear(arrN);
>>
>> is there something like:
>>
>> clear(ALL);
>
> No, but perhaps you can do a:
> foreach(a; ALL)
>    a.clear()

That should probably be

foreach ( a; ALL )
     clear( a );


-- 
Simen


More information about the Digitalmars-d-learn mailing list