Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: ANSI C questions (parameters, structure assignment) Message-ID: <1990Aug23.154013.28712@zoo.toronto.edu> Organization: U of Toronto Zoology References: <1081.26d26274@desire.wright.edu> Date: Thu, 23 Aug 90 15:40:13 GMT In article <1081.26d26274@desire.wright.edu> demon@desire.wright.edu writes: > 1) In standard C, when you pass a structure bigger than four >longwords, is the structure passed as a value parameter, or just a pointer to >the structure (thus making it a var parameter)? When you pass a structure, it is passed by value, regardless of size. > 2) Are structure assignments allowed only for initializations >or can I do: >struct_thing = other_struct_thing; Yes, you can. >struct_thing -= still_more_struct; >struct_thing *= even_more_struct; No; plain assignment (and the implicit assignments in passing and returning) are the *only* operators that work on whole structures. -- Committees do harm merely by existing. | Henry Spencer at U of Toronto Zoology -Freeman Dyson | henry@zoo.toronto.edu utzoo!henry