Addresses of parameters

david wald wald-david at CS.YALE.EDU
Sun Oct 30 14:09:29 AEST 1988


In article <10164 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
>In article <35664 at XAIT.Xerox.COM> g-rh at XAIT.Xerox.COM (Richard Harter) writes:
>>In article <10124 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
>>>I've never considered it unportable to initialize auto variables to an
>>>arbitrary expression.
>>
>>Well, I didn't say it was not portable -- I said that I wouldn't think of
>>using it.
>
>I was responding to the previous poster, who considered it a "non-portable
>abbreviation for an extra line of code".

I'm afraid I was just adding confusion here.  By non-portable I meant
that I wouldn't be surprised to find compilers that couldn't deal with
it.

>Do you ever change the value of a parameter variable, or do you treat it
>as a constant?

If "do you" is a question of style, my answer is "never." I can't think
of any real excuse for doing it, and, as a matter of style, I like to
know that the parameters passed into a function I'm writing are always
available, and right where I think they are.



============================================================================
David Wald                                              wald-david at yale.UUCP
						       waldave at yalevm.bitnet
============================================================================



More information about the Comp.lang.c mailing list