Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!vsi!friedl From: friedl@vsi.COM (Stephen J. Friedl) Newsgroups: comp.lang.c Subject: Re: printf() problem Summary: arg evaluation Message-ID: <1109@vsi.COM> Date: 28 Apr 89 15:04:33 GMT References: <11657@hodge.UUCP> <2679@buengc.BU.EDU> Organization: V-Systems, Inc. -- Santa Ana, CA Lines: 27 [talking about why printf() "rearranges" the order of its arguments] In article <2679@buengc.BU.EDU>, bph@buengc.BU.EDU (Blair P. Houghton) writes: > > If there are compilers that do it the other way (FIFO stack for args), > I don't know about them. You're best bet, however, is not to trust > the order of evaluation of arguments, regardless. Actually, they're all FIFO stacks. It's been my observation that args are evaluated right-to-left on machines where the stack grows down and left-to-right if the stack grows up. The WE32100 (AT&T 3B2) and I think the PDP-11 all have an up-growing stack, and they operate this way. I don't know if it's a cause-and-effect relationship, but once I studied this and it seemed plausible guess. Steve P.S. - A *FIFO* stack? -- Stephen J. Friedl / V-Systems, Inc. / Santa Ana, CA / +1 714 545 6442 3B2-kind-of-guy / friedl@vsi.com / {attmail, uunet, etc}!vsi!friedl As long as Bush is in office, you'll never see Nancy Reagan in *my* .sig.