Re: Two interpretations
On Fri, Jun 11, 2021 at 03:00:00PM +, JG via Digitalmars-d-learn wrote: > Is it specified somewhere which way the following program will be > interpreted? > > import std; > > struct A > { > int x=17; > } > > int x(A a) > { > return 100*a.x; > } >
Two interpretations
Is it specified somewhere which way the following program will be interpreted? import std; struct A { int x=17; } int x(A a) { return 100*a.x; } void main() { A a; writeln(a.x); }