arrays and foreach

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Apr 16 17:00:46 PDT 2012


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;


More information about the Digitalmars-d-learn mailing list