Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!leah!bingvaxu!vu0310 From: vu0310@bingvaxu.cc.binghamton.edu (R. Kym Horsell) Newsgroups: comp.lang.c Subject: Re: ANSI C questions (parameters, structure assignment) Message-ID: <3879@bingvaxu.cc.binghamton.edu> Date: 22 Aug 90 21:59:22 GMT References: <1081.26d26274@desire.wright.edu> Reply-To: vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell) Organization: SUNY Binghamton, NY Lines: 25 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)? I std doesn't care much about 2 bytes, 4 bytes, etc. When you *ask* for a struct to be passed by value you *get* it otherwise your code would probably upchuck. > > 2) Are structure assignments allowed only for initializations >or can I do: > >struct_thing = other_struct_thing; Sure. >struct_thing -= still_more_struct; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^? How should a struct be interpreted as a number (even if it contains only a single numeric field)? No, this isn't valid. -Kym Horsell