Does anyone use 'with' statement?
Matti Niemenmaa
see_signature at for.real.address
Sun Dec 9 04:29:06 PST 2007
Xinok wrote:
> class N{
> int a, b, c;
> }
>
> void main(){
> int a, b, c;
> N obj = new n;
> with(obj){
> a = 35; // main.a
> .a = 60; // obj.a
> }
> }
What about when there's an a at global scope:
class N {
int a, b, c;
}
int a;
void main() {
int a, b, c;
N obj = new N;
with (obj) {
a = 35; // main.a
.a = 60; // obj.a or global a?
}
}
--
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi
More information about the Digitalmars-d
mailing list