arrays and foreach

darkstalker slayerbeast at gmail.com
Mon Apr 16 17:02:04 PDT 2012


On Tuesday, 17 April 2012 at 00:00:57 UTC, Andrej Mitrovic wrote:
> On 4/17/12, darkstalker <slayerbeast at gmail.com> wrote:
>>  It possible to have 'p' passed by reference?
>
> Yes and the answer is in the question:
>
> foreach (ref p; a)
>     p = 42;

thanks, it works


More information about the Digitalmars-d-learn mailing list