Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!husc6!mit-eddie!uw-beaver!uw-june!pardo From: pardo@june.cs.washington.edu (David Keppel) Newsgroups: comp.lang.c Subject: C sintax Message-ID: <4080@june.cs.washington.edu> Date: 26 Jan 88 01:36:17 GMT References: <7072@brl-smoke.ARPA> <7160@brl-smoke.ARPA> <3932@hoptoad.uucp> <4079@june.cs.washington.edu> Reply-To: pardo@uw-june.UUCP (David Keppel) Organization: U of Washington, Computer Science, Seattle Lines: 27 ( This isn't related to anything, but I've been unable to figure ) ( out a mail path to the guy who asked, and I wanted to answer ) >> ;-D on (My favorite sintax: switch(x+=*a+++*b){...}) Pardo > >Boy, you've got that. That's a sin, or should be. >What, precisely, does x+=*a+++*b mean? Well, actually it is ambiguous. There are 2 (or more?) ways to parse it. I'm not sure the behavior is defined from lexer to lexer as to which one is preferred. Here are some possible interpretations: tmp = *a + ++*b; /* means increment *b and add that to *a */ x += tmp; switch (x) {...} the (an) other is tmp = *a++ + *b; /* means add *a to *b and increment a */ x += tmp; switch (x) {...} Not, of course that this is the most obfuscated code possible, but it does get the point across. ;-D on (What point?) Pardo