My handy has send to soon....

This code:

int counter;

void foo(scope int a) {
    counter = a;
}

void main() {
    int num = 42;
    foo(num);
}

works fine but I think it should not. So can you explain me the use of scope as a storage class?

Reply via email to