Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!oliveb!bunker!shap From: shap@bunker.UUCP (Joseph D. Shapiro) Newsgroups: comp.lang.c Subject: Re: "address" of a bitfield Message-ID: <6470@bunker.UUCP> Date: 20 Jul 89 18:01:44 GMT References: <2840@blake.acs.washington.edu> Reply-To: shap@clunker.UUCP (Joseph D. Shapiro) Organization: ISC-Bunker Ramo, an Olivetti Company, Shelton, Ct Lines: 21 In article <2840@blake.acs.washington.edu> wiml@blake.UUCP (William Lewis) writes: > > For the usual reasons, I have to pass the address of a variable to >a function. (The function needs to read, and possibly modify, any of a >large number of variables of diverse types.) Unfortunately, many of these this may not apply, but you should probably consider not passing the address, but the value, and use something like: x = function(x); if function is declared as unsigned long function(unsigned long x); the compiler will do all the type conversions for you, even for bit fields. -- __--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__ Joe Shapiro "My other car is a turbo... ISC-Bunker Ramo ...too." {decvax,yale,philabs,oliveb}!bunker!shap