[dmd-beta] D1 1.073 beta

Jacob Carlborg doob at me.com
Wed Feb 8 12:46:26 PST 2012


On 8 feb 2012, at 21:34, Walter Bright wrote:

>> On 08 Feb, 2012,at 10:21 AM, Walter Bright <walter at digitalmars.com> wrote:
>> 
>>> http://ftp.digitalmars.com/dmd1beta.zip
>>> _______________________________________________
>>> dmd-beta mailing list
>>> dmd-beta at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>> 
>> 
>> I'm looking at this commit:
>> 
>> https://github.com/D-Programming-Language/d-programming-language.org/commit/59e9decffc8f6fd3439492c406279ddf327b9b1b
>> 
>> Why was "ref" removed?
> 
> D1 doesn't have ref.


Of course it does. It's been there for a long as I can remember. In fact, according to the changelog, it's been there since 2007:

http://www.digitalmars.com/d/1.0/changelog.html#new1_011

"Added keywords ref and macro."
"ref now works as a replacement for inout."

This works as expected with DMD 1.072:

void foo (ref int i)
{
    i++;
}

void main ()
{
    int a = 3;
    foo(a);
    assert(a == 4);
}

-- 
/Jacob Carlborg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20120208/77389914/attachment.html>


More information about the dmd-beta mailing list