Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!camelback!volpe From: volpe@camelback.crd.ge.com (Christopher R Volpe) Newsgroups: comp.std.c Subject: Re: More Re: Function Argument Evaluation argument Message-ID: <18140@crdgw1.crd.ge.com> Date: 2 Apr 91 13:24:16 GMT References: <17936@crdgw1.crd.ge.com> <15607@smoke.brl.mil> Sender: news@crdgw1.crd.ge.com Reply-To: volpe@camelback.crd.ge.com (Christopher R Volpe) Lines: 26 In article , rjohnson@shell.com (Roy Johnson) writes: |>I understand that the comma operator is a sequence point. |>If we use the comma operator as a sequence point between evaluations: |> |> int v=1; |> printf("%d %d\n", (1, v), (1,v++)); |> |>This can print |> 1 1 |>or |> 2 1 |> |>Do I win? 8^) Hey, that looks pretty good. No matter what the order of evaluation of the function arguments is, there's always a sequence point separating the references to v. So the behavior is not undefined, yet order of evaluation definitely has a drastic effect on the output. Anybody see a problem with that? ================== Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com