From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <427CF340.4060807@asgaard.homelinux.org> Date: Sat, 7 May 2005 18:56:32 +0200 From: =?UTF-8?B?Ik5pbHMgTy4gU2Vsw6VzZGFsIg==?= User-Agent: Mozilla Thunderbird 1.0.2-1 (X11/20050323) MIME-Version: 1.0 To: 9fans@cse.psu.edu Content-Type: text/plain; charset=UTF-8; format=flowed Subject: [9fans] KenC operator overloading. Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 466649ae-ead0-11e9-9d60-3106f5b1d025 Hello, I recently ventured down the cmd/cc/ sources. And what did I discover ? Take a peek of the following (sorry ass of an -) example and see yourself= . #include #include struct Foo { int x,y; }; typestr struct Foo Foo; Foo Foo_add_(Foo a,Foo b) { return (Foo){a.x+b.x, a.y+b.y}; } void main(void) { Foo f1 =3D {1,1},f2 =3D {2,2},f3; f3 =3D f1 + f2; print("%d,%d\n",f3.x,f3.y);=09 exits(nil); } Neat, no ? Any particular reason this isn't documented ? -- Nils O. Sel=C3=A5sdal